Eu uso o sistema do Jiddo de npcs, e fiz um Npc de potions baseado nele, e funcionou e tals, ms quando eu falo strong ou great mana/health potion, ele da só a potion normal, a primeira, ou seja ele lê só como mana/health potion
<npc name="Rachel" script="data/npc/scripts/fluids.lua" autowalk="25" floorchange="0" access="3" level="1" maglevel="1"> <health now="150" max="150"/> <look type="134" head="76" body="81" legs="76" feet="19" addons="3" corpse="2212"/> <parameters> <parameter key="module_shop" value="1" /> <parameter key="message_greet" value="Hello |PLAYERNAME|. I am a potions seller!" /> <parameter key="shop_buyable" value="vial,7478,5;flask,7478,5" /> <parameter key="shop_buyable" value="mana potion,7620,50;smp,7589,80;gmp,7590,120;health potion,7618,50;shp,7588,100;ghp,7590,200" /> <parameter key="message_farewell" value="Farewell |PLAYERNAME|!" /> </parameters> </npc>
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end keywordHandler:addKeyword({'potions'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell mana potions, strong mana potions and great mana potions. I also sell health, strong and great health potions.'}) npcHandler:addModule(FocusModule:new())
Alguém pode me ajudar?