• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Help me with this values script

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?
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
 
I don't understand what your request/issue is.
I'm guessing nobody else is quite sure what your asking for either.

Can you rephrase your issue?
Or explain what the script is supposed to be doing, and what it is not doing?
Do you receive any errors?
What TFS are you using?
How do guilds "own" a city?
 
I don't understand what your request/issue is.
I'm guessing nobody else is quite sure what your asking for either.

Can you rephrase your issue?
Or explain what the script is supposed to be doing, and what it is not doing?
Do you receive any errors?
What TFS are you using?
How do guilds "own" a city?

This movemment is a tile... you can move on only if your guild own the city

For exemple:
Tile in carlin is: actionid=2391

Only the guild own carlin can move on

I need know how this values work to make somethings changes like:
Check if the guild already have a city, to dont get other
 
I don't understand what your request/issue is.
I'm guessing nobody else is quite sure what your asking for either.

Can you rephrase your issue?
Or explain what the script is supposed to be doing, and what it is not doing?
Do you receive any errors?
What TFS are you using?
How do guilds "own" a city?

I have full script posted here:
 
Last edited:
Last edited:
Back
Top