I'm changing the system Woe.
I need you to say "!castle" the guild system to check that the player is the same as the guild that has conquered the castle and teleport.
For example:
On player say !castle..
If playerguildid = guild.conquered.castle then
Teleport to castle.
Else
"Your guild not own the castle"
Here its my code:
The only error its " InternalGetPlayerInfo Player Not found when requesting player info #11"
I need you to say "!castle" the guild system to check that the player is the same as the guild that has conquered the castle and teleport.
For example:
On player say !castle..
If playerguildid = guild.conquered.castle then
Teleport to castle.
Else
"Your guild not own the castle"
Here its my code:
Lua:
dofile("./_woe.lua")
local time=60
local storage = 1000
local res = db.getResult("SELECT `guild` FROM `woe`;")
local res1 = getPlayerGuildId(cid)
function onSay(cid, words, params)
if isPlayer(cid) then
if exhaustion.check(cid, storage) then
Woe.moveBack(cid, fromPosition, "You have to wait "..time.." for attack de castle again.")
end
if res1 == res then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Good Luck Defensor ")
doTeleportThing(cid, {x=54, y=82, z=7})
doSendMagicEffect(getThingPos(cid))
exhaustion.set(cid, storage, time*60)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need conquer the castle first.")
end
end
return true
end
function onAddItem(moveitem, tileitem, position)
doRemoveItem(moveitem.uid, moveitem.type > 0 and moveitem.type or 1)
return true
end
The only error its " InternalGetPlayerInfo Player Not found when requesting player info #11"
Last edited: