L2Tower Discord
Let's keep the community alive with discord.
Discussions about plugins and scripts
L2Tower Discord
Thread Rating:
- 0 Vote(s) - 0 Average
- 1
- 2
- 3
- 4
- 5
testforl2
Expired VIP Member
 
Posts: 259
Joined: Jun 2013
Reputation: 40
Version:
1.4.3.143
|
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 |
|
Messages In This Thread |
RE: RbCheck - testforl2 - 05-17-2014 10:45 AM
|
User(s) browsing this thread: