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

Clearly Im Doing Somthing Wrong

Angel Of Death

Rise Of Tibia ServerOwner
Joined
Mar 12, 2012
Messages
91
Reaction score
0
LUA:
	elseif(msgcontains(msg, "Skill")) then
	    if(getPlayerStorageValue(cid, 60010) < 0) then
		if doPlayerRemoveMoney(cid, 5000) == true then
		    setPlayerStorageValue(cid, 60010, 1)
			npcHandler:say("This {Skill} is a very high quality item. Use it wisely.", cid, 1000)
		else
			npcHandler:say("You don't have enught money to learn this {Skill}.", cid, 1000)
		end
	end

i want it to check player storage to see of it = 0 before setting the player storage to 1
i dont think i can have 2 if statements in one line and if so i don't know how

so simply i want it to check storage then check for money and if both come back true i want it to take the money and then set player storage
 
LUA:
if getPlayerStorageValue(cid,x) ~= 1 then
      setPlayerStorageValue(cid,x,1)
      print("Storage has been set.")
   else
      print("Error, storage already set.")
end

>
LUA:
 elseif(msgcontains(msg, "Skill")) then
	    if getPlayerStorageValue(cid, 60010) ~= then
			if doPlayerRemoveMoney(cid, 5000) == TRUE then
				setPlayerStorageValue(cid, 60010, 1)
				npcHandler:say("This {Skill} is a very high quality item. Use it wisely.", cid, 1000)
			else
				npcHandler:say("You don't have enught money to learn this {Skill}.", cid, 1000)
		end
	end
 
Last edited:
LUA:
elseif(msgcontains(msg, "Skill")) then
		if getPlayerStorageValue(cid,storage) ~= 1 then
			if doPlayerRemoveMoney(cid,5000) == TRUE then
				setPlayerStorageValue(cid,storage,1)
				npcHandler:say("This {skill} has very high quality, use it wisely.",cid)
			else npcHandler:say("Come back when you have enough money to learn the {skill}.",cid)
			end
		else npcHandler:say("You have already learned this {skill}.",cid)
		end
	end
 
LUA:
elseif(msgcontains(msg, "Skill")) then
		if getPlayerStorageValue(cid,storage) ~= 1 then
			if doPlayerRemoveMoney(cid,5000) == TRUE then
				setPlayerStorageValue(cid,storage,1)
				npcHandler:say("This {skill} has very high quality, use it wisely.",cid)
			else npcHandler:say("Come back when you have enough money to learn the {skill}.",cid)
			end
		else npcHandler:say("You have already learned this {skill}.",cid)
		end
	end


Thanks Mate That Works Like I Wanted It To Great Work You've Got My Reputation +1
 
Back
Top