Serginov
Onkonkoronkonk
I have Rashid in my server, using Nahruto's script(I think it was Nahruto, correct me if I'm wrong) for changing place
Here's the script;
Now here's my question:
It is possible to make the NPC check what day it is? Like Monday, on mondays in real tibia he's standing in Svargrond.
Example: We say the clock is 23:59 CET(Sunday he's in Carlin), now the time changed to 00:00 so now it's Monday. Now he changes place to Svargrond!
and we say for example the server crashes on Monday 15:39 CET.
I did put Rashid on my mapeditor in Thais for example, so when I start the server Rashid is in Thais! (This is NOT good!)
But then I had some luck - someone of you(otlanders) made a Globalevent script(or something, thanks <3) That will check the time with an interval of 20sec for example.
Then the script recognize that it's monday, then he will change the place on rashid to Svargrond(where rashid should be on mondays).
Well, I explained as good as I could, hope it helps.
THANKS IN ADVANCE AND HOPE THIS IS POSSIBLE!!
Would be AWSOME if an Angel(or maybe more angels) make this script for me(I guess more peoples here on Otland would be gratefull too)
I'm using Cryingdamson 0.3.4pl2
Here's the script;
Lua:
local myNewPos = {
[1] = {x=32210, y=31157, z=7},
[2] = {x=32297, y=32831, z=7},
[3] = {x=32574, y=32752, z=7},
[4] = {x=33067, y=32880, z=6},
[5] = {x=33239, y=32483, z=7},
[6] = {x=33170, y=31810, z=6},
[7] = {x=32328, y=31782, z=7}
}
local TpTime = 10800 --secs
local myLastTP = 0
local a = 1
function onThink()
if myLastTP == 0 then
myLastTP = os.time()
end
if os.difftime (os.time(), myLastTP) >= TpTime then
myLastTP = os.time()
doCreatureSay(getNpcCid(), "See you, Now Im going to the next city!", TALKTYPE_SAY)
doTeleportThing(getNpcCid(), myNewPos[a], FALSE)
if (a + 1) < 7 then
a = a + 1
else
a = 1
end
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('I don\t got all day!')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good bye then.')
focus = 0
end
end
npcHandler:onThink()
end
Now here's my question:
It is possible to make the NPC check what day it is? Like Monday, on mondays in real tibia he's standing in Svargrond.
Example: We say the clock is 23:59 CET(Sunday he's in Carlin), now the time changed to 00:00 so now it's Monday. Now he changes place to Svargrond!
and we say for example the server crashes on Monday 15:39 CET.
I did put Rashid on my mapeditor in Thais for example, so when I start the server Rashid is in Thais! (This is NOT good!)
But then I had some luck - someone of you(otlanders) made a Globalevent script(or something, thanks <3) That will check the time with an interval of 20sec for example.
Then the script recognize that it's monday, then he will change the place on rashid to Svargrond(where rashid should be on mondays).
Well, I explained as good as I could, hope it helps.
THANKS IN ADVANCE AND HOPE THIS IS POSSIBLE!!
Would be AWSOME if an Angel(or maybe more angels) make this script for me(I guess more peoples here on Otland would be gratefull too)
I'm using Cryingdamson 0.3.4pl2
Last edited: