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

Lua What is the error?

russogracie

New Member
Joined
Sep 9, 2010
Messages
205
Reaction score
2
I needed to modify and fix some things in this script could someone help me?

This is the creaturescripts:

local guildOwner = 9001

function onLogin(cid)
local guild = getPlayerGuildId(cid)
if getGlobalStorageValue(cid, guildOwner) == guild then
if getPlayerStorageValue(cid, 10001) == -1 then
if getPlayerGuildRank(cid) == 'Leader' then
doPlayerAddItem(cid, 2160, 10)
doPlayerAddExp(cid, 100000)
setPlayerStorageValue(cid, 10001, 1)
doPlayerSendTextMessage(cid, 22, "Congratulations! Your guild was winning the war for the castle! You are the Leader, so won 100 000 Exp Points and 100 000 gold coins.")
else
doPlayerAddExp(cid, 100000)
setPlayerStorageValue(cid, 10001, 1)
doPlayerSendTextMessage(cid, 22, "Congratulations! Your guild was winning the war for the castle! You won 100 000 Exp Points!")
end
end
else
setPlayerStorageValue(cid, 10001, -1)

end
return TRUE
end


1°- He stated that the award was given only for level 100 + is and the tag that would have to be modified:

doPlayerAddItem(cid, 2160, 10)

2° - The script to deliver award for Leader of the guild would not work knowing what is wrong with the script.
 
Last edited:
Back
Top