• 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!

[Request]Automatic Join Guild

elnelson

Lunaria World Dev
Joined
Jun 20, 2009
Messages
586
Solutions
2
Reaction score
61
Location
México
Hello im requesting this if you guys are interested to help me.

well. if you're resident of Thais automactly add you to "the Thais Guild"
if you change your residense to another city (for example carlin) it will add you automatcly to "the Carlin Guild"
can u guys help me?

regards, thank you.
 
movements.xml
XML:
<movevent type="StepIn" actionid="1010" event="script" value="script_name.lua"/>

/scripts/script_name.lua
Lua:
local conf = {
        cityId = 3,	  -- City to be citizen
		guildId = 50, -- ID of guild created
}

function onStepIn(cid, item, pos, frompos, topos)
        if isPlayer(cid) then
                doPlayerSetTown(cid, conf.cityId)
                doPlayerSendTextMessage(cid,25,"Congratulations! You are the newest resident of ".. getTownName(conf.cityId) ..".")
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
				doSendMagicEffect(topos,14)
				doPlayerSetGuildId(cid, conf.guildId)	
				doCreatureSay(cid,'You will be kicked to update your guild according to your new city.', TALKTYPE_ORANGE_1)
				addEvent(doRemoveCreature, 5 * 1000, cid)
		else
                doTeleportThing(cid, frompos)
        end
return true
end
 
Back
Top