ghettobird
LUA newbie
Hey otlanders, i had some free time today (again ) so i made a scroll that teleports you to temple.
@OFF TOPIC: a lot of people have been asking me where i learn lua while it's right in front of their eyes, so just to avoid any other question of that kind, here is what i DO WHEN I SCRIPT :-
1st: open http://otland.net/f481/scripting-guide-74030/
2nd: open lua functions (docs -> lua functions)
3rd: i just put them together... it's really easy if you try!
-------------------------------------------------------------------------------------------------
now since that's out of the way we can get back to track,
in your actions/scripts put this
now go to actions.xml and post this
i really hope you guys like it, it really takes time (or at least for me) to make these scripts
anyway, ENJOY! eace:
@OFF TOPIC: a lot of people have been asking me where i learn lua while it's right in front of their eyes, so just to avoid any other question of that kind, here is what i DO WHEN I SCRIPT :-
1st: open http://otland.net/f481/scripting-guide-74030/
2nd: open lua functions (docs -> lua functions)
3rd: i just put them together... it's really easy if you try!
-------------------------------------------------------------------------------------------------
now since that's out of the way we can get back to track,
in your actions/scripts put this
Lua:
local newpos = {x=1000, y=1000, z=7}
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if not inFight then
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid,newpos)
doCreatureSay(cid, "TELEPORTED!!" ,25)
else
doPlayerSendTextMessage(cid,25,"You can't use the teleport scroll if you are PZ LOCKED!!")
end
return true
end
now go to actions.xml and post this
Lua:
<action itemid="itemidyouwant" event="script" value="yourscriptname.lua"/>
i really hope you guys like it, it really takes time (or at least for me) to make these scripts
anyway, ENJOY! eace: