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

Posts: 45
Joined: Feb 2013
Reputation: 0
Version: 1.4.2.134.3b
Post: #1
RbCheck
So i have this script.

-- Yes you can put this here..., it will be executed on script load time...
PlayerToBeNotified = "workforme" ;
raidbosses = { "Varka's Chief Horus", 25315, "Execution Grounds Watchman Guillotine", 25888, "Baium", 29020, "Queen Ant", 29001, "Ketra's Chief Brakki", 25305, "Flame of Splendor Barakiel", 25325, "Varka's Holy Altar", 31560, "Ketra's Holy Altar", 31558, "Ketra's Hero Hekaton", 25299, "Varka's Hero Shadith", 25309, }
SpanwedList = {} ;

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() .." at " .. os.date("%X") .. "!")
SendPM(PlayerToBeNotified, " > Raidboss ".. npc:GetName() .." < has spawned at " .. os.date("%X") .. " so go kill it!")
Command("@Raidboss ".. npc:GetName() .." has spawned at " .. os.date("%X") .. " so go kill it!")
PlaySound(GetDir() .. "alarm.wav")
table.insert(SpanwedList,npc:GetId())
end;
end;

function OnNpcInfo(npc)
--Event called when we get some info about some npc/monster (he spawn)
for k, v in pairs(raidbosses) do

if (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;




And i dont know where to put the alarm.wav sound.

Can anyone help please?
11-28-2013 00:29 AM
Find all posts by this user Quote this message in a reply
shunda Offline
Expired VIP Member
**

Posts: 67
Joined: Jul 2013
Reputation: 18
Version: 1.4.2.132
Post: #2
RE: RbCheck
There are some posts about this... use search... Tongue
11-28-2013 01:12 AM
Find all posts by this user Quote this message in a reply
MtnDew Offline
VIP Member
***

Posts: 500
Joined: Mar 2012
Reputation: 108
Version: 1.4.2.141
Post: #3
RE: RbCheck
In the same folder as the script.

+1 or +2 me if I helped you or you think I'm an ass. Tongue
11-28-2013 01:13 AM
Find all posts by this user Quote this message in a reply
JazzDancer Offline
Expired VIP Member
**

Posts: 45
Joined: Feb 2013
Reputation: 0
Version: 1.4.2.134.3b
Post: #4
RE: RbCheck
I did search Sad you wont belive me, but i did.

Ty Big Grin
11-28-2013 03:16 AM
Find all posts by this user Quote this message in a reply
cobra8co Offline
Unknown
***

Posts: 410
Joined: Sep 2012
Reputation: 67
Version: 1.4.3.143
Post: #5
RE: RbCheck
this is one sample raid checker http://forum.l2tower.eu/thread-free-easy...light=easy and this is what I was use in the past and was work for me 100%

--- +1 or +2 me if I was helped you! try Google is your friend!
11-28-2013 10:35 AM
Find all posts by this user Quote this message in a reply
testforl2 Offline
Expired VIP Member
**

Posts: 259
Joined: Jun 2013
Reputation: 40
Version: 1.4.3.143
Post: #6
RE: RbCheck
Since other thread is closed, how i stop it from sending message at Clan chat? There is no @ symbol in the whole code!

...
...
...

Code:
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;
04-09-2014 07:58 AM
Find all posts by this user Quote this message in a reply
testforl2 Offline
Expired VIP Member
**

Posts: 259
Joined: Jun 2013
Reputation: 40
Version: 1.4.3.143
Post: #7
RE: RbCheck
Ok..

I just updated to .123

The below RBcheck scipt stopped working. Tested with RBs alive.
No PM at the receiver toon.

Code:
-- Yes you can put this here..., it will be executed on script load time...
PlayerToBeNotified = "charname" ;
raidbosses = { "RB1", XXXXX, }
SpanwedList = {} ;

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() .." at " .. os.date("%X") .. "!")
SendPM(PlayerToBeNotified, " > Raidboss ".. npc:GetName() .." < has spawned at " .. os.date("%X") .. " so go kill it!")
PlaySound(GetDir() .. "alarm.wav")
table.insert(SpanwedList,npc:GetId())
end;
end;

function OnNpcInfo(npc)
--Event called when we get some info about some npc/monster (he spawn)
for k, v in pairs(raidbosses) do

if (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;

Any commands changed?
05-17-2014 03:35 AM
Find all posts by this user Quote this message in a reply
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
eustach3 Offline
VIP Member
***

Posts: 324
Joined: Sep 2011
Reputation: 133
Version: 1.4.3.143
Post: #9
RE: RbCheck
This function:
Code:
function OnNpcInfo(npc)
Works like this.. if I am near the boss spawned and start the plugin, nothing will happen.
Only if i am near the boss spot and he spawns after 30 sec then it will work the code inside.
If you are sure that the code is ok,(didn`t check it) then downgrade to another l2tower version.
05-17-2014 11:02 AM
Find all posts by this user Quote this message in a reply
testforl2 Offline
Expired VIP Member
**

Posts: 259
Joined: Jun 2013
Reputation: 40
Version: 1.4.3.143
Post: #10
RE: RbCheck
Yeap. I need it to come to spot from far away.
Savior!
05-17-2014 11:13 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)