L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RbCheck
Author Message
testforl2 Offline
Expired VIP Member
**

Posts: 259
Joined: Jun 2013
Reputation: 40
Version: 1.4.3.143
Post: #8
RE: RbCheck

Bump!!
Anyone?

Not even this other script is working...

Code:
PlayerToBeNotified = "name" ; -- Set here name of the char that you want to recieve PM when any of raids spawn (you might want to minizmie window for spy and play another char meanwhile so u can get pm on it)
raidbosses = { "RB1", xxxxx, } ; -- Set here monster names or their NpcIds that you want to be warned of when they spawn near.
wavfilename = "" ; -- set here the filename of the sound you want to play when raid spawn it must be .wav and in l2tower folder or leave it empty.

SpanwedList = {} ;
ChestDetectionStamp = os.time();

function CheckIfInSpawnedTable(npcid)
    if (SpanwedList ~= nil) then
for x,y in pairs(SpanwedList) do
if (y == npcid) then
return true;
end;
end;
    end;
return false;
end;


function alert(npc)
    if (CheckIfInSpawnedTable(npc:GetId()) == false) then
ShowToClient("RBCheck", "Raidboss ".. npc:GetName() .." has spawned so go kill it!")
SendPM(PlayerToBeNotified, "Raidboss ".. npc:GetName() .." has spawned now so go kill it!")
if (wavfilename ~= "") then
PlaySound(GetDir() .. wavfilename)
end;
table.insert(SpanwedList,npc:GetId())
    end;
end;

function CheckForRaidsAndChests()

local MobList = GetMonsterList();
for npc in MobList.list do

    for k, v in pairs(raidbosses) do
if (type(v) == "string") and (string.upper(npc:GetName()) == string.upper("Treasure Chest")) and (ChestDetectionStamp+60 < os.time()) then --
ShowToClient("Chest Detector", "A Treasure Chest is near ".. GetMe():GetName() .." on Coordinates (" .. npc:GetLocation().X .. "," .. npc:GetLocation().Y .. "," ..npc:GetLocation().Z .. ") so go Open it!")
ChestDetectionStamp = os.time();
elseif (type(v) == "string") and (string.upper(npc:GetName()) == string.upper(v)) then
alert(npc)
elseif (type(v) == "number") and (npc:GetNpcId() == v) then
alert(npc)
end;
    end;
end;

end;

function OnLTick1s()
CheckForRaidsAndChests();
end;

URGENT guys....



Well. the small script gives me some "ding windows" sound when NPC found. (you know the http://www.youtube.com/watch?feature=pla...b2HSM#t=17 one)

Means it catches the "RB" but cant send PM.
(This post was last modified: 05-17-2014 11:02 AM by testforl2.)
05-17-2014 10:45 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RbCheck - JazzDancer - 11-28-2013, 00:29 AM
RE: RbCheck - shunda - 11-28-2013, 01:12 AM
RE: RbCheck - MtnDew - 11-28-2013, 01:13 AM
RE: RbCheck - JazzDancer - 11-28-2013, 03:16 AM
RE: RbCheck - cobra8co - 11-28-2013, 10:35 AM
RE: RbCheck - testforl2 - 04-09-2014, 07:58 AM
RE: RbCheck - testforl2 - 05-17-2014, 03:35 AM
RE: RbCheck - testforl2 - 05-17-2014 10:45 AM
RE: RbCheck - eustach3 - 05-17-2014, 11:02 AM
RE: RbCheck - testforl2 - 05-17-2014, 11:13 AM
RE: RbCheck - eustach3 - 05-17-2014, 11:34 AM



User(s) browsing this thread: