in talkactions/scripts/portal.lua
talkactions.xml
now in movements/scripts/portal.lua
and movements.xml
how do use?
login gm and say !portal x,y,z,players_ammount like:
!portal 127,54,7,20
and 20 players who goto portal are teleported to position 127,54,7 and portal auto remove. : ))
I'm used it's to events ( 5 first players win! )
Yours,
azi.
PHP:
function onSay(cid, words, param)
local param = param.explode(param, ',')
if param then
teleport = doCreateTeleport(1387, {x=param[1], y=param[2], z=param[3]}, getPlayerPosition(cid))
doSetItemSpecialDescription(teleport, 'The portal may enter '..param[4]..' people left.')
doSetItemActionId(teleport, 100+param[4])
else
doPlayerSendCancel(cid, "You must set param.")
end
return TRUE
end
talkactions.xml
PHP:
<talkaction access="5" log="yes" words="!portal" script="portal.lua"/>
PHP:
function onStepIn(cid, item, position, fromPosition)
if item.actionid > 100 then
doSetItemSpecialDescription(item.uid, 'The portal may enter '..(item.actionid-101)..' people left.')
doSetItemActionId(item.uid, item.actionid-1)
end
return TRUE
end
function onStepOut(cid, item, position, fromPosition)
if item.actionid == 100 then
doSendMagicEffect(position, 2)
doRemoveItem(item.uid, 1)
end
return TRUE
end
and movements.xml
PHP:
<movevent type="StepIn" itemid="1387" event="script" value="portal.lua"/>
<movevent type="StepOut" itemid="1387" event="script" value="portal.lua"/>
how do use?
login gm and say !portal x,y,z,players_ammount like:
!portal 127,54,7,20
and 20 players who goto portal are teleported to position 127,54,7 and portal auto remove. : ))
I'm used it's to events ( 5 first players win! )
Yours,
azi.
Last edited: