• 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 Some bugs and questions tfs 1.1

Pasiac

New Member
Joined
Jul 4, 2008
Messages
44
Reaction score
4
Hi, I have some problem with my server. So first of all I wanted to make script which will send text message when I leave a sqm. My knowledge is equal to 0. I am only trying to do it on my own, looking on other scripts etc. So dont laught at me.
function onStepOut(cid, item, frompos, itemEx, topos)

if getCreaturePosition(cid) == { x = 989, y = 1023, z = 7 } then
doPlayerSendTextMessage(cid, 21, "Text")
end
return true
end
No error in console, but when i step out this tile I dont get msg.
Also saved in movements.xml as
<movevent event="StepOut" itemid="item id from i am leaving" script="name.lua"/>


Second thing but not as important as my own work is
revive system:
https://otland.net/threads/tfs-1-1-revive-system.229948/
I was trying to delete option kill me, because it looks easy to remove, but I can't while testing there was a lot of bugs so I run out of ideas and gave up.
If someone can help me, it will be the best to remove option teleport to temple. I think this is the longest part of the script so I am too newbie to see all parts which i neeed to remove.



Thank you otland

#edit
Hahah I got next problem
function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.itemid == 5094 then
doPlayerSendTextMessage(cid, 22, (player:getSex() == PLAYERSEX_FEMALE) and "Znalazlas" or " Znalazles".. "banana.")
doPlayerAddItem(cid,2676,1)

end
return true
end
It should send msg Znalazlas banana to her, and znalazles banana to him.
It worked in previous version:
doPlayerSendTextMessage(cid, 22, "znalazles banana")
 
Last edited:
How about just sending the text?
Code:
function onStepOut(cid, item, frompos, itemEx, topos)
    doPlayerSendTextMessage(cid, 21, "Text")
    return true
end
 
Back
Top