• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction + Movement - Create Portal with players go limit!

i also did:

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
    doBroadcastMessage("The Event is full, and the portal is closed.", MESSAGE_EVENT_ADVANCE)  
    doSendMagicEffect(position, 2)
    doRemoveItem(item.uid, 1)
    end
    return TRUE
end

makes it so it says that the event is full and the portal is closed
 
#Sorry for polish#!!!!
Azi mam problem jak wejde w teleport to mi nie zabiera -1 gracz.
a dokladniej jak mam 100 Poeple left [czy jak to tam] to jak wejde w tp to dalej zostaje tyle samo! :/
#ENG#
please help i have a problem when i step in in the teleport then the player limit don't go - :/ i have set 100 people can enter ,but when i stand on the teleport and it teleport me then is again 100 people :/
 
I am using 0.3.3 (Crying Damson) and the limit isnt working.

Code:
14:29 You see a magic forcefield.
The portal may enter 2 people left.
ItemID: [1387].
ActionID: [102].
Position: [X: 1081] [Y: 1020] [Z: 7].
But the limit never goes away.
Any Help? =]
 
Well Done!!
I testing this on 0.3.4(Crying Damson) and all work.
You have problem to limit? You must in:
movements.xml
PHP:
<movevent event="StepIn" itemid="1387" script="portal.lua"/>
<movevent event="StepOut" itemid="1387" script="portal.lua"/>
Change to:
PHP:
<movevent type="StepIn" itemid="1387" event="script" value="portal.lua"/>
<movevent type="StepOut" itemid="1387" event="script" value="portal.lua"/>

Sorry for my english i learn speak and read :)

@edit
I after scripts for my.
I have problem to message to creating portal and i fix:
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])
	doBroadcastMessage('The portal is Open, and first '..param[4]..' players win. Look for teleport!', MESSAGE_EVENT_ADVANCE)
    else
    doPlayerSendCancel(cid, "You must set param.")
    end
    return TRUE
end
 
Last edited:
Can't get it working for 0.2.2 mystic spirit.
Is it not supposed to work for 0.2 TFS? (Added the rows to Global.lua)
 
Code:
[17/06/2009 16:39:54] [Error - MoveEvent::configureMoveEvent] No valid event name "script"
[17/06/2009 16:39:54] [Warning - BaseEvents::loadFromXml] Can not configure event
[17/06/2009 16:39:54] [Error - MoveEvent::configureMoveEvent] No valid event name "script"
[17/06/2009 16:39:54] [Warning - BaseEvents::loadFromXml] Can not configure event

It just says that ...
I dont know whats wrong but, when I logg in with my GOD Acc and say /portal 160,54,7,2 the teleport appears but it doesnt disappears after the players got in ...

you can help me?
(if you want to know my tfs version uhhmm I just can say im using EldinWorld)

EDIT:
Im using 0.3.1.x
 
Last edited:
Yea It's very nice script to events. It's working on tfs 0.3.4 perfectly. :) I would give rep++ but... You must spread some Reputation around..... I like your script.

Keep working!


//LordXavy
 
Azi do i need any function for TFS 0.3.4 for this script?
i need this script to change outfit if someone enter the teleport
example:(But now working :( im not good scripter :()
PHP:
local outfit =
{
    {
        lookType   = 268,
        lookHead   = 129,
        lookBody   = 129,
        lookLegs   = 129,
        lookFeet   = 129,
        lookAddons = 3
    }
}

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)
    doSetCreatureOutfit(cid, outfit, 1500)
    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
 
Last edited:
Back
Top