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

Solved Weaponsmith error!

tommy91

Member
Joined
Oct 27, 2010
Messages
270
Solutions
1
Reaction score
21
Location
Sweden
Here is our Lua for a crafter! But there is a problem, when they say that they want like Dream matter, the Weaponsmith asks them and then even if you have all of the items, he says: 21:27 Weaponsmith: I'm sorry, but you do not have the required items for this trade.

Can anyone help me?

Though, i have no idea how to put in the lua text.

https://www.dropbox.com/s/eifjlb0q77bf3j1/Weaponsmith.lua?dl=0
 
Last edited:
[.code] << remove dots >> [./code]
Code:
npcHandler.topic[cid] = 1
You need to increase the topic number for each new piece of armor.
Just doing your first two items..
Code:
-- thunder hammer
elseif msgcontains(msg, 'thunder hammer') then
   if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,2452) >= 1 and getPlayerItemCount(cid,2444) >= 1 then
     npcHandler:say('Did you bring me the 100 demonic essences, heavy mace and hammer of wrath to craft {thunder hammer}?', cid)
     npcHandler.topic[cid] = 1
   else
     npcHandler:say('I need {100 demonic essences, heavy mace and hammer of wrath}, to give you one Thunder Hammer. Please come back when you have them.', cid)
     npcHandler.topic[cid] = 0
   end
elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 1 then
   npcHandler.topic[cid] = 0
   if getPlayerItemCount(cid,6500) >= 100 and getPlayerItemCount(cid,2452) >= 1 and getPlayerItemCount(cid,2444) >= 1 then
     if doPlayerRemoveItem(cid,6500, 100) and doPlayerRemoveItem(cid,2452,1) and doPlayerRemoveItem(cid,2444,1) == TRUE then
       npcHandler:say(done, cid)
       doPlayerAddItem(cid, 2421,1)
     end
   else
     npcHandler:say(item, cid)
   end
   
-- upgrade crystal
elseif msgcontains(msg, 'upgrade crystal') then
   if getPlayerItemCount(cid,21399) >= 5 then
     npcHandler:say('Did you bring me the 5 golden task tokens to craft {upgrade crystal}?', cid)
     npcHandler.topic[cid] = 2
   else
     npcHandler:say('I need {5 golden task tokens}, to give you one Upgrade Crystal. Please come back when you have them.', cid)
     npcHandler.topic[cid] = 0
   end
elseif msgcontains(msg, 'yes') and npcHandler.topic[cid] == 2 then
   npcHandler.topic[cid] = 0
   if getPlayerItemCount(cid,21399) >= 5 then
     if doPlayerRemoveItem(cid,21399,5) == TRUE then
       npcHandler:say(done, cid)
       doPlayerAddItem(cid, 8300,1)
     end
   else
     npcHandler:say(item, cid)
   end
 
Back
Top