• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent "Boat System"

babalow

Nobody o/
Joined
Nov 7, 2007
Messages
393
Reaction score
1
Location
Brazil
I see one script at radonia and i decided to make ^_^

in radonia when u passing to main u are teleported at water ...

Starting.. goto data/movements.xml and add this
Code:
<movevent event="StepIn" itemid="405" script="playermoving/playermoving.lua"/>
<movevent event="StepOut" itemid="405" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4608" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4609" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4610" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4611" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4612" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4613" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4614" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4615" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4616" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4617" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4618" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4619" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4620" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4621" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4622" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4623" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4624" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4625" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4664" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4665" script="playermoving/playermoving.lua"/>
<movevent event="StepIn" itemid="4666" script="playermoving/playermoving.lua"/>
goto data/movements/scripts and create a folder 'playermoving' and add playermoving.lua inside...
Code:
-- by Babalow
local [COLOR=blue]waterItemID = {4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4664, 4665, 4666}[/COLOR]
local [COLOR=slategray]decreasingItemID = {405}[/COLOR]
function onStepOut(cid, item, position, fromPosition)
    if isInArray(decreasingItemID, item.itemid) == TRUE and [COLOR=red]item.actionid == 8556 [/COLOR]then
        doTransformItem(item.uid, 4608)
        [COLOR=indigo]doSetItemActionId(item.uid, 8556)[/COLOR]
    end
    return TRUE
end
function onStepIn(cid, item, position, fromPosition)
    if [COLOR=blue]isInArray(waterItemID, item.itemid) == TRUE [/COLOR]and [COLOR=red]item.actionid == 8556[/COLOR] then
        doTransformItem(item.uid, 405)
        [COLOR=indigo]doSetItemActionId(item.uid, 8556)[/COLOR]
        charPos = getPlayerPosition(cid)
        wall1 = {x=charPos.x+1, y=charPos.y, z=charPos.z}
        wall2 = {x=charPos.x, y=charPos.y+1, z=charPos.z}
        wall3 = {x=charPos.x-1, y=charPos.y, z=charPos.z}
        wall4 = {x=charPos.x, y=charPos.y-1, z=charPos.z}
        wall5 = {x=charPos.x+1, y=charPos.y+1, z=charPos.z}
        wall6 = {x=charPos.x-1, y=charPos.y-1, z=charPos.z}
        wall7 = {x=charPos.x+1, y=charPos.y-1, z=charPos.z}
        wall8 = {x=charPos.x-1, y=charPos.y+1, z=charPos.z}
[COLOR=darkorange]   doCreateItem(437,1,wall1)[/COLOR]
[COLOR=darkorange]   doCreateItem(435,1,wall2)[/COLOR]
[COLOR=darkorange]   doCreateItem(436,1,wall3)[/COLOR]
[COLOR=darkorange]   doCreateItem(434,1,wall4)[/COLOR]
[COLOR=darkorange]   doCreateItem(444,1,wall5)[/COLOR]
[COLOR=darkorange]   doCreateItem(442,1,wall6)[/COLOR]
[COLOR=darkorange]   doCreateItem(443,1,wall7)[/COLOR]
[COLOR=darkorange]   doCreateItem(445,1,wall8)[/COLOR]
[COLOR=lime]mayNotMove(cid, 1)[/COLOR]
[COLOR=lime]mayNotLogout(cid, 1)[/COLOR]
[COLOR=orange]NextPos = {x=charPos.x, y=charPos.y-1, z=charPos.z}[/COLOR]
local a = {cid=cid, NextPos=NextPos}
[COLOR=sienna]addEvent(onTime,1*1*550,a)[/COLOR]
    elseif item.itemid == 405 and item.actionid == 8885 then
    doTeleportThing(cid, {x = getPlayerPosition(cid).x, y = getPlayerPosition(cid).y - 1, z = getPlayerPosition(cid).z}, FALSE)
    elseif item.itemid == 405 and item.actionid == 8888 then
    mayNotMove(cid, 0)
    mayNotLogout(cid, 0)
    end
    return TRUE
end
function onTime(a)
        Rwall1 = {x=charPos.x+1, y=charPos.y, z=charPos.z, stackpos=1}
        Rwall2 = {x=charPos.x, y=charPos.y+1, z=charPos.z, stackpos=1}
        Rwall3 = {x=charPos.x-1, y=charPos.y, z=charPos.z, stackpos=1}
        Rwall4 = {x=charPos.x, y=charPos.y-1, z=charPos.z, stackpos=1}
        Rwall5 = {x=charPos.x+1, y=charPos.y+1, z=charPos.z, stackpos=1}
        Rwall6 = {x=charPos.x-1, y=charPos.y-1, z=charPos.z, stackpos=1}
        Rwall7 = {x=charPos.x+1, y=charPos.y-1, z=charPos.z, stackpos=1}
        Rwall8 = {x=charPos.x-1, y=charPos.y+1, z=charPos.z, stackpos=1}
        getwall1 = getThingfromPos(Rwall1)
        getwall2 = getThingfromPos(Rwall2)
        getwall3 = getThingfromPos(Rwall3)
        getwall4 = getThingfromPos(Rwall4)
        getwall5 = getThingfromPos(Rwall5)
        getwall6 = getThingfromPos(Rwall6)
        getwall7 = getThingfromPos(Rwall7)
        getwall8 = getThingfromPos(Rwall8)
        doRemoveItem(getwall1.uid,1)
        doRemoveItem(getwall2.uid,1)
        doRemoveItem(getwall3.uid,1)
        doRemoveItem(getwall4.uid,1)
        doRemoveItem(getwall5.uid,1)
        doRemoveItem(getwall6.uid,1)
        doRemoveItem(getwall7.uid,1)
        doRemoveItem(getwall8.uid,1)
doTeleportThing(a.cid,a.NextPos,TRUE)
end
explain...
water ids ..
actionid of waterid..
Next position..
Time...
don't let you logout and walk
border of "boat"
setactionid added to work at rev 426 o.o


First:


when u walk to tile[405] with actionid [8885] u are teleported 1 sqm up .. and it starts moving =]


PS: when u moving the code don't let you move/logout [ mayNotMove(cid, 1)
mayNotLogout(cid, 1)
]
and at end .. tile 405 actionid 8888 .. [
mayNotMove(cid, 0)
mayNotLogout(cid, 0)

You can change the time for the next event editing it for another value:
addEvent(onTime,1*1*550,a)
'1*1*550'

well .. is it

not mine idea .. but i do it myself :wub:
i love the scripts of Radonia Server :D

Know Bugs:
* if more of 1 player use it at same time don't remove some "borders".

ps: If someone know why it don't setting actionid automatic at rev 426 plx tell me =] ( only in this script )
ps2: bad english and bad scripter.. but i try ! ;*
:rolleyes:
Edit1: Well .. added setactionid to item.. at rev 426 don't working without setting it don't know why o.o
Edit2: added know bugs..
Edit3: oh thz for kennyeni .. i forgot to put credits for me o.o
 
Last edited:
Thank you for releasing but next time please at the owners of radonia permission to release it
 
@up

erm .. "sorry?"

but it's free and radonia not owner i think .. o0

i don't think i need ask for permission but if it make you happy .. ok

i don't want fight for doing something i want..

ps: and i don't know for who i ask too ..
 
Last edited:
MM perfect system! just one question, I cannot move or login after beign in the boat!, is it a bug of forgotten? or whats heppening?
 
MM perfect system! just one question, I cannot move or login after beign in the boat!, is it a bug of forgotten? or whats heppening?

Well In the script it says
mayNotMove(cid, 1)
mayNotLogout(cid, 1)

witch bassically explains its self nad no its not a bug

Sincerly,
Yours Pablol

@ontopic Nice System Babalow id like to see more of these scripts made by you :p
 
MM perfect system! just one question, I cannot move or login after beign in the boat!, is it a bug of forgotten? or whats heppening?

erm.. well ... u start moving and can't logout and move ..
at end u need add one tile 405 with action 8888

Code:
elseif item.itemid == 405 and item.actionid == 8885 then
 doTeleportThing(cid, {x = getPlayerPosition(cid).x, y = getPlayerPosition(cid).y - 1, z = getPlayerPosition(cid).z}, FALSE)
 [COLOR=red]elseif item.itemid == 405 and item.actionid == 8888 then[/COLOR]
 mayNotMove(cid, 0)
 mayNotLogout(cid, 0)
 end
 return TRUE
end

or change it on the script...
at last tile the player are moved
i post one ss in some minutes....done.




Well In the script it says


witch bassically explains its self nad no its not a bug

Sincerly,
Yours Pablol

@ontopic Nice System Babalow id like to see more of these scripts made by you :p
well .. i can try , but i'm not good scripter .. o.o
 
Last edited:
Thanks for the help, I didnt notice that in the script, and because of no screeny... well I thank you for help, I was so busy with the updates that I seen this script and just copied it, put a text message to give yo credits and thats all
 

Similar threads

Back
Top