warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I have this script to check if your guild have own X city
I put actionID 2391 in a tile and only guilds own Carlin can pass on this tile...
I need check two things
1- Check if your guild have any city 2391, 2392, 2393... 2398.
2- Show guild name own city 2391, 2392, 2393... 2398
Its possible?
I put actionID 2391 in a tile and only guilds own Carlin can pass on this tile...
I need check two things
1- Check if your guild have any city 2391, 2392, 2393... 2398.
2- Show guild name own city 2391, 2392, 2393... 2398
Its possible?
Code:
<movevent type="StepIn" actionid="2391-2398" event="script" value="tile_acess_members_own_city.lua"/>
Code:
local guilds = {
--[actionid] = número da cidade configurado em cityMonsters,
[2391] = 1,
[2392] = 2,
[2393] = 3,
[2394] = 4,
[2395] = 5,
[2396] = 6,
[2397] = 7,
[2398] = 8,
}
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) then return true end
local guildId = getGlobalStorageValue(guilds[item.actionid] + DEFAULT_STORAGE)
if getPlayerGuildId(cid) ~= guildId then
doTeleportThing(cid, fromPosition)
doPlayerSendCancel(cid, 'This territory is not of your Guild')
end
return true
end