• 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!

Lua Chess Talkaction

chupaescadatri

Banned User
Joined
Jul 5, 2014
Messages
338
Reaction score
49
Hello
I do not know how to call the function
The players are the chessboard pieces (ok)
Make a talkaction !Play (ok)
In this talkaction the player would have to make the movement of the horse that is to walk in L (x)
2 sqm up and one to the left
how to do this?
If I know how to do this I can already discover all the rest of the other pieces​
 
Solution
!play horse, E4
-> Check if valid horse move.
-> Teleport creature to location.
-> (or) Teleport with small delay 3 times, NNW | NNE | EEN | EES | SSE | SSW | WWS | WWN
!play horse, E4
-> Check if valid horse move.
-> Teleport creature to location.
-> (or) Teleport with small delay 3 times, NNW | NNE | EEN | EES | SSE | SSW | WWS | WWN
 
Solution
Code:
function onSay(cid, words, param)

pos = {{x = 32340, y = 31783, z = 7}, {x = 32340, y = 31784, z = 7}, {x = 32340, y = 31785, z = 7}, {x = 32341, y = 31785, z = 7},  {x = 32342, y = 31785, z = 7}}

doSendMagicEffect(getPlayerPosition(cid),53)

doPlayerSendCancel(cid,"chess")
function doTpWithDelay(cid, delay)
    if delay > 0 then
doTeleportThing(cid,pos[delay])
end
function onSay(cid, item, pos)
    doTpWithDelay(cid, #pos)
    return true
end
the idea is good but it did not work
 
Back
Top