Kippetjee
Member
i need a script when use a lever the town id changed so when im ded in carlin
that i will reswpam on carlin too
that i will reswpam on carlin too
function onUse(cid, item, fromPosition, itemEx, toPosition)
local towns = {
[COLOR="red"][1001][/COLOR] = { -- [COLOR="red"]Lever Action ID[/COLOR]
town = 1
},
[1002] = {
town = 2
},
[1003] = {
town = 3
}
}
local v = towns[item.actionid]
return doPlayerSetTown(cid, v.town) and doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
end
and the movements action ?
function onUse(cid, item, fromPosition, itemEx, toPosition)
local towns = {
[1001] = { -- Lever Action ID
town = 1
},
[1002] = {
town = 2
},
[1003] = {
town = 3
}
}
local v = towns[item.actionid]
return doPlayerSetTown(cid, v.town) and doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) and doPlayerSendTextMessage(cid,22,"You are now Chitzen of ".. getTownName(getPlayerTown(cid)) ..".")
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local towns = {
[1001] = { -- Lever Action ID
town = 1
},
[1002] = {
town = 2
},
[1003] = {
town = 3
}
}
local v = towns[item.actionid]
return doPlayerSetTown(cid, v.town) and doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) and doPlayerSendTextMessage(cid,22,"You are now Chitzen of ".. getTownName(v.town) ..".")
end
I already fixed it via private message.