• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent ,Talkaction] Easy residence system

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 :>
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
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:
Code:
<movevent type="StepIn" actionid="5555-5556" event="script" value="name.lua"/>
if you use 5555 and 5557 aids for example you need indicate with this code:
5555;5557
:)

i hope you like it!:D
 
Tab your codes. Maybe someone will use this.

And for f**k sake don't make triple posts, you can only bump once per 24 HOURS!
 
Back
Top