I'll just training on scripting so maybe this will work i dont know cause not tested,
Can be useful for peoples.
Edited1: A bug fix
Edited2: One more bug fix, also changed text.
Edited3: More bugs fixed and changed text again.
Can be useful for peoples.
PHP:
-- Script by Ates
function onStepIn(cid, item, pos)
-- /Pos,Msg,TownID/--
local config = {
[40000] = {x=1000, y=1001, z=7, "You are a citizen of Thais now.", 1},
[40001] = {x=1000, y=1002, z=7, "You are a citizen of Venore now.", 2},
[40002] = {x=1000, y=1003, z=7, "You are a citizen of Carlin now.", 3},
[40003] = {x=1000, y=1004, z=7, "You are a citizen of Kazardoon now.", 4},
[40004] = {x=1000, y=1005, z=7, "You are a citizen of Svargrond now.", 5},
[40005] = {x=1000, y=1006, z=7, "You are a citizen of Ankrahmun now.", 6}
}
local teleport = 1387
if isPlayer(cid) == TRUE then
for action, variable in pairs(config) do
if item.id == teleport then
doCreatureSay(cid, variable[2], TALKTYPE_ORANGE_1)
doPlayerSetTown(cid, variable[3])
doTeleportThing(variable[1])
doSendMagicEffect(variable[1],2)
end
return TRUE
end
end
Edited1: A bug fix
Edited2: One more bug fix, also changed text.
Edited3: More bugs fixed and changed text again.
Last edited: