soul4soul
Intermediate OT User
its just an update of this code so it works with 0.3.6TFS. all you have to do in order for it to work is copy it into the mods folder. its that simple
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Portal" version="2.0" enabled="yes">
<description>
---makes a portal to a location for a specified number of people
ex. !portal x,y,z,amountofpeople
</description>
<talkaction words="!portal" access="5" event="script"><![CDATA[
function onSay(cid, words, param)
param = param.explode(param, ',')
if param then
teleport = doCreateTeleport(1387, {x=param[1], y=param[2], z=param[3]}, getPlayerPosition(cid))
doItemSetAttribute(teleport, "description", 'The portal may enter '..param[4]..' people left.')
doItemSetAttribute(teleport, "aid", 100+param[4])
else
doPlayerSendCancel(cid, "You must set param.")
end
return TRUE
end
]]></talkaction>
<movement type="StepIn" itemid="1387" event="script"><![CDATA[
function onStepIn(cid, item, position, fromPosition)
if item.actionid > 100 then
doItemSetAttribute(item.uid, "description", 'The portal may enter '..(item.actionid-101)..' people left.')
doItemSetAttribute(item.uid, "aid", item.actionid-1)
elseif item.actionid == 100 then
doBroadcastMessage("The Portal has ran out of energy and collapsed.", MESSAGE_EVENT_ADVANCE)
doSendMagicEffect(position, 2)
doRemoveItem(item.uid, 1)
end
return true
end
]]></movement>
</mod>
Last edited: