warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I made a better topic
Last edited:
1- About storages value, thats why i ask, I am struggling to identifyto throne just use storage values, on your second question i dont get it, sing what? you mean tibia sound effects?
I just found it too, but how to make a ifDEFAULT_STORAGE = 49198
it's the storage value whats the problem?
so you need to edit this script to add a new storage value for each city.
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
[2391] = 1,
[2392] = 2,
[2393] = 3,
first of all your lua syntax completely wrong, for loops on lua automatically increase +1 to variable, so you don't need do += or +1 (+= are another syntax mistake to lua as well), as far i know there is no way stop attacking or refuse a attack through lua, anyway you cant just add new creature event from nothing, i never heard before about target event the only ones i ever meet is that ones https://github.com/otland/forgottenserver/blob/master/src/creatureevent.cpp#L166-188, i dont know how your system work, easiest way to block a player to target monster is prevent player reach the monster with stepin/out.What i made worng?