Hello.
I have read some tutorials after some tips and hints when i made a script.
Now i made a new intressting script and think i done it right
Can some one check it fast and tell me if i made it right this time?
Thanks for all help and tips!
I have read some tutorials after some tips and hints when i made a script.
Now i made a new intressting script and think i done it right
Can some one check it fast and tell me if i made it right this time?
Lua:
-- Script made by Mithaz
-- Date : 2011 - 01/13
-- Vocation Teleport Tile
local config = {
action = 10007,
newPos = { x = 1176, y =199 , z =7 },
playerPos = getCreaturePosition(cid),
voc = 4
}
function onStepIn(cid, item, frompos, itemEx, topos)
if item.actionid == config.action and getPlayerVocation(cid) == config.voc then
DoTeleportThing(cid, config.newPos, false)
else
config.playerPos.x - 1
DoTeleportThing(cid, config.playerPos, false)
DoPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have to be a warrior to get teleported to the warriors armory.")
end
end
Thanks for all help and tips!