KylerXX
Active Member
- Joined
- Jun 24, 2010
- Messages
- 439
- Reaction score
- 30
Function of this script:
When you log in the temple or are stepping up the temple position. if you have the residence system on there will make you resident, if you have it off, there will be no problem and not tell you anything
Talkaction:
This talkactions check if the residence system its off or on, depends on if you want to active :>
Now the movement:
If you use remember that should put an actionis to each temple position and must indicate the ground id of temple position is in the loop cityaids on the third option.
movement.xml:
if you use 5555 and 5557 aids for example you need indicate with this code:
5555;5557
![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
i hope you like it!![Big Grin :D :D](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
When you log in the temple or are stepping up the temple position. if you have the residence system on there will make you resident, if you have it off, there will be no problem and not tell you anything
Talkaction:
This talkactions check if the residence system its off or on, depends on if you want to active :>
Code:
function onSay(cid, words, param, channel)
params = {
["on"] = {1, "Residence system is now on!"},
["off"] = {-1, "Residence system is now off!"}
}
local parame = params[param]
if parame then
setPlayerStorageValue(cid, 1456, parame[1])
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, parame[2])
end
return 0
end
Now the movement:
Code:
function onStepIn(cid, item, pos, fromPos)
local cityaids = {
[5555] = {1, "Town 1", 405},
[5556] = {2, "Town 2", 407}
}
local city = cityaids[item.actionid]
if item.itemid == city[3] then
if city then
if getCreatureStorage(cid, 1456) == 1 then
doPlayerSetTown(cid, city[1])
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Now you are resident of "..city[2]..".")
elseif getCreatureStorage(cid, 1456) == -1 then
end
end
end
return true
end
movement.xml:
Code:
<movevent type="StepIn" actionid="5555-5556" event="script" value="name.lua"/>
5555;5557
i hope you like it!