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

Help With this NPC

MxSoft

Leave Tibia, Live Life.
Joined
Dec 22, 2009
Messages
1,804
Solutions
1
Reaction score
44
Location
Mexico
Hi, is not a bug, well my sweety cylops wants 50k so player must have 50 coins if not you cant make the quest.
Code:
getPlayerItemCount(cid,2152) >= 50
How do i change this to allow all kind of coins.
Greetings
 
Ty but i can fin d away to fix it :/
Code:
elseif msgcontains(msg, 'amulet') then
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,2152) >= 50 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			npcHandler:say("Um Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no?", cid)
			talk_state = 12
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 12 then
		talk_state = 0
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,2152) >= 50 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and doPlayerRemoveItem(cid,2152,50) then
				npcHandler:say("Here you are!", cid)
				doPlayerAddItem(cid, 8266, 1)
				talk_state = 0
			end
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'no') and talk_state >= 1 and talk_state <= 5 then
		npcHandler:say('Well, then leave.')
		talk_state = 0
	end
 
Code:
elseif msgcontains(msg, 'amulet') then
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1  and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
                if getPlayerMoney(cid) >= 50000 then
			npcHandler:say("Um Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no?", cid)
			talk_state = 12
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
          end
	elseif msgcontains(msg, 'yes') and talk_state == 12 then
		talk_state = 0
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and doPlayerRemoveMoney(cid,50000)  then
				npcHandler:say("Here you are!", cid)
				doPlayerAddItem(cid, 8266, 1)
				talk_state = 0
			end
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'no') and talk_state >= 1 and talk_state <= 5 then
		npcHandler:say('Well, then leave.')
		talk_state = 0
	end

try that
 
Last edited:
Ok test it, your script remove me 5cc then when i say yes other 5ccs are gone, i need to replace
Code:
                if doPlayerRemoveMoney(cid,5000) then
With a function that only counts money,
Does doPlayerCountMoney exists? ---- Noob question i am not scripter
 
LUA:
local t = {
[cc] = 1,
[pc] = 50,
[gc] = 50000
}--itemID = {Quantity}
for k, v in pairs(t) do
    if getPlayerItemCount(cid, k) >= v[1] then
 
try this 1 then

Code:
elseif msgcontains(msg, 'amulet') then
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1  and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			npcHandler:say("Um Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no?", cid)
			talk_state = 12
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 12 then
		talk_state = 0
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and doPlayerRemoveMoney(cid,50000)  then
				npcHandler:say("Here you are!", cid)
				doPlayerAddItem(cid, 8266, 1)
				talk_state = 0
			end
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'no') and talk_state >= 1 and talk_state <= 5 then
		npcHandler:say('Well, then leave.')
		talk_state = 0
	end
 
Last edited:
whats the errors?

Code:
elseif msgcontains(msg, 'amulet') then
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1  and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			npcHandler:say("Um Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no?", cid)
			talk_state = 12
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 12 then
		talk_state = 0
		if getPlayerItemCount(cid,8262) >= 1 and getPlayerItemCount(cid,8263) >= 1 and getPlayerItemCount(cid,8264) >= 1 and  getPlayerItemCount(cid,8265) >= 1 then
			if doPlayerRemoveItem(cid,8262,1) and doPlayerRemoveItem(cid,8263,1) and doPlayerRemoveItem(cid,8264,1) and  doPlayerRemoveItem(cid,8265,1) and doPlayerRemoveMoney(cid,50000)  then
				npcHandler:say("Here you are!", cid)
				doPlayerAddItem(cid, 8266, 1)
				talk_state = 0
			end
		else
			npcHandler:say("You don't have these items!", cid)
			talk_state = 0
		end
	elseif msgcontains(msg, 'no') and talk_state >= 1 and talk_state <= 5 then
		npcHandler:say('Well, then leave.')
		talk_state = 0
	end

and try that 1. 1 thing changed
 
Back
Top