Q: Jak to działa ?
A: Zamyka cie w pokoju na pewien okres czasu ;D
Q: Ten skrypt może summonowac potwory ?
A: Tak, patrz punkt 4b.
Q: To jest scrypt Movements ?
A: Tak xP
Q: Dlaczego piszesz łatwe do ustawienia skrypty (-- options --)?
A: Żeby każdy newbie mogł go używać
A: Zamyka cie w pokoju na pewien okres czasu ;D
Q: Ten skrypt może summonowac potwory ?
A: Tak, patrz punkt 4b.
Q: To jest scrypt Movements ?
A: Tak xP
Q: Dlaczego piszesz łatwe do ustawienia skrypty (-- options --)?
A: Żeby każdy newbie mogł go używać
strogeValue = 8000 -- Storage Value
text = 'Wtf o.O !?' -- Tekst który się pokaże po zamknięciu drzwi
waitTime = 60 -- czas do otwarcia drzwi
dir = North -- kierunek, gdzie gracz zostanie przesuniety po wejsciu na drzwi(North, South, West, East)
-- monsters options --
monsterpos = {x=187, y=445, z=7} -- pozycja 1 potwora
monsterpos2 = {x=189, y=445, z=7} -- pozycja 2 potwora
monsterpos3 = {x=188, y=446, z=7} -- pozycja 3 potwora
monsterpos4 = {x=191, y=446, z=7} -- pozycja 4 potwora
monster1name = 'Rat' -- nazwa 1 potwora
monster2name = 'Rat' -- nazwa 2 potwora
monster3name = 'Rat' -- nazwa 3 potwora
monster4name = 'Rat' -- nazwa 4 potwora
text = 'Wtf o.O !?' -- Tekst który się pokaże po zamknięciu drzwi
waitTime = 60 -- czas do otwarcia drzwi
dir = North -- kierunek, gdzie gracz zostanie przesuniety po wejsciu na drzwi(North, South, West, East)
-- monsters options --
monsterpos = {x=187, y=445, z=7} -- pozycja 1 potwora
monsterpos2 = {x=189, y=445, z=7} -- pozycja 2 potwora
monsterpos3 = {x=188, y=446, z=7} -- pozycja 3 potwora
monsterpos4 = {x=191, y=446, z=7} -- pozycja 4 potwora
monster1name = 'Rat' -- nazwa 1 potwora
monster2name = 'Rat' -- nazwa 2 potwora
monster3name = 'Rat' -- nazwa 3 potwora
monster4name = 'Rat' -- nazwa 4 potwora
a) nie summonujący potworów
w trap_room.lua
Kod PHP:
-- Trap Room via Movements by Duda1992 --
function doorDecay(p)
-- do not touch --
pos = {x=p.pos.x, y=p.pos.y, z=p.pos.z, stackpos = 1}
item = getThingfromPos(pos)
doTransformItem(item.uid, p.itemid)
end
-- do not touch -- end --
function onStepIn(cid, item, pos)
-- options --
strogeValue = 8000
text = 'Wtf o.O !?'
waitTime = 60
dir = North
-- end options --
-- do not touch --
isDone = getPlayerStorageValue(cid,strogeValue)
-- do not touch -- end --
-- script --
if isPlayer(cid) == 1 then
if isDone == -1 then
doMoveCreature(cid, dir)
doTransformItem(item.uid, item.itemid-1)
setPlayerStorageValue(cid, strogeValue, 1)
doPlayerSay(cid,text,1)
p = {pos = pos, itemid = item.itemid}
addEvent(doorDecay, waitTime*1000, p)
end
end
end
-- end script --
Kod PHP:
<movevent event="StepIn" actionid="8000" script="trap_room.lua" />
w trap_room.lua
Kod PHP:
-- Trap Room via Movements by Duda1992 --
function doorDecay(p)
-- do not touch --
pos = {x=p.pos.x, y=p.pos.y, z=p.pos.z, stackpos = 1}
item = getThingfromPos(pos)
doTransformItem(item.uid, p.itemid)
end
-- do not touch -- end --
function onStepIn(cid, item, pos)
-- options --
strogeValue = 8000
text = 'Wtf o.O !?'
waitTime = 60
dir = North
-- monsters options --
monsterpos = {x=187, y=445, z=7}
monsterpos2 = {x=189, y=445, z=7}
monsterpos3 = {x=188, y=446, z=7}
monsterpos4 = {x=191, y=446, z=7}
monster1name = 'Rat'
monster2name = 'Rat'
monster3name = 'Rat'
monster4name = 'Rat'
-- end monsters options --
-- end options --
-- do not touch --
isDone = getPlayerStorageValue(cid,strogeValue)
-- do not touch -- end --
-- script --
if isPlayer(cid) == 1 then
if isDone == -1 then
doMoveCreature(cid, dir)
doTransformItem(item.uid, item.itemid-1)
doSummonCreature(monster1name, monsterpos)
doSummonCreature(monster2name, monsterpos2)
doSummonCreature(monster3name, monsterpos3)
doSummonCreature(monster4name, monsterpos4)
setPlayerStorageValue(cid, strogeValue, 1)
doPlayerSay(cid,text,1)
p = {pos = pos, itemid = item.itemid}
addEvent(doorDecay, waitTime*1000, p)
end
end
end
-- end script --
Kod PHP:
<movevent event="StepIn" actionid="8000" script="trap_room.lua" />
6)BUG
Nie znalazłem zadnego błedu.
To jest mój pierwszy skrypt z użyciem addEvent
Comment Please ^_^
Wasz,
Duda1992
-----------
Duda1992 to GM Piotr (nie da sie zmienic nazwy użytkownika ;/)
Zakładki