Jack Parsons
Member
I've seen many scripts using "onUse", and that doesn't make sense to me (Since I'm not going to actually use the portal). The "onUse" scripts don't work for me as well. I'm using The Forgotten Server 1.0 (1041 client).
Here's my script:
It seems pretty logical to me, since the action is about stepping in, and not about "using". Nevertheless, it just doesn't work.
The mainstream version with "onUse" doesn't work as well:
And here's the action inside actions.xml:
Also, the script is properly inside portals inside scripts inside actions inside data.
Here's my script:
Code:
local portalPos = {x = 1023, y = 1020, z = 6}
function onStepIn(cid, item, position, fromPosition)
if position == portalPos then
doPlayerSetTown(cid, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
doSendAnimatedText(portalPos, "You are now living in the main part of the Agharti Empire!", TEXTCOLOR_GOLD)
end
return TRUE
end
It seems pretty logical to me, since the action is about stepping in, and not about "using". Nevertheless, it just doesn't work.
The mainstream version with "onUse" doesn't work as well:
Code:
local portalPos = {x = 1023, y = 1020, z = 6}
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSetTown(cid, 1)
doTeleportThing(cid, portalPos, TRUE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doSendAnimatedText(portalPos, "You are now living in the main part of the Agharti Empire!", TEXTCOLOR_GOLD)
return TRUE
end
And here's the action inside actions.xml:
Code:
<actions>
<!-- > Portals </!-->
<action uniqueid="2000" script="portals/agharti_main.lua"/>
</actions>
Also, the script is properly inside portals inside scripts inside actions inside data.