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

[OnUse] Doors

Inteligentny

Im not.
Joined
Aug 2, 2008
Messages
485
Reaction score
0
How to make script with OnUse that is teleporting u next (1 tile) after doors
and send some magic effect? can be simply teleport effect = 10

1* Here want to be teleported when click on doors (they shouldnt open)
2* Door
3* me



Code:
1
2
3
 
function onUse(cid, item, pos)
newposition = {x=252, y=254, z=7}
if item.actionid == 1000 then -- 1000 for example
doTeleportThing(cid,newposition)
doSendMagicEffect(newposition,14)
end
end

newposition - here you enter the new position as u want!
1000 - here you need to add at your mapeditor a new action.id,
if you want use 1000, your welcome, but check if already not used
14 - here you can add the magic effect, 14 is CONST_ME_MAGIC_GREEN

not sure if it will work, just try
 
Last edited:
Hmm ok its working thanks, I have second question

how to add to this one something like:

Code:
doCreatureSay("Aaaah...", TALKTYPE_ORANGE_1)
????

Cause that one isnt working there is error in console:

Code:
[30/01/2009 03:43:06] luaDoCreatureSay(). Creature not found
 
Hmm ok its working thanks, I have second question

how to add to this one something like:

Code:
doCreatureSay("Aaaah...", TALKTYPE_ORANGE_1)
????

Cause that one isnt working there is error in console:

Code:
[30/01/2009 03:43:06] luaDoCreatureSay(). Creature not found

Code:
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
 
Back
Top