Postado Dezembro 27, 2017 7 anos Olá, Tibianos! Estou tentando implantar em meu ot server um sistema de auras... importei os scripts do servidor do Cater (Kpdo) mas o npc não implanta de fato as auras mesmo que eu tenha o pokemon com boost +200 e os 10 diamonds já procurei em todo fórum mas não consegui resolver... O erro é que o pokemon está boost + 200 e eu tenho na bag os 10 diamonds de id (2145) quando falo com o NPC Aurora ela diz 02:43 Pedro: hi 02:43 Aurora: Hello Pedro. ! I can sell auras you need help? 02:43 Pedro: help 02:43 Aurora: Nice Your need a 10 diamonds and pokemon +199 , have green aura, yellow aura, orange aura,cyan aura, grey aura, blue aura, red aura, purple aura 02:44 Pedro: green aura 02:44 Aurora: Please i trade only 10 diamonds and pokemon +199 ** OBS:: JÁ TENTEI COM TODAS AS CORES DE AURA ** ** BASE QUE USO CENTURION V4** **POKETIBIA** Estou usando esse código no caminho DATA/NPC/SCRIPTS/aura.lua Spoiler local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid if msgcontains(string.lower(msg), "help") then selfSay("Nice Your need a 10 diamonds and pokemon +199 , have green aura, yellow aura, orange aura,cyan aura, grey aura, blue aura, red aura, purple aura") talkState[talkUser] = 1 elseif talkState[talkUser] == 1 and msgcontains(string.lower(msg), "aura") then if #getCreatureSummons(cid) >= 1 then return selfSay("Please Back You pokemon and move in feet sloot") end local pokemondoido = getPlayerSlotItem(cid, 8) if pokemondoido.itemid <= 10 then return selfSay("Please Back You pokemon and move in feet sloot") end local candy = getItemAttribute(pokemondoido.uid, "candy") if not candy then return selfSay("Please i trade only 10 diamonds and pokemon +199") end local aurakpdo = 207 if msgcontains(string.lower(msg), "green") then aurakpdo = 169 elseif msgcontains(string.lower(msg), "yellow") then aurakpdo = 207 elseif msgcontains(string.lower(msg), "orange") then aurakpdo = 174 elseif msgcontains(string.lower(msg), "cyan") then aurakpdo = 170 elseif msgcontains(string.lower(msg), "grey") then aurakpdo = 163 elseif msgcontains(string.lower(msg), "blue") then aurakpdo = 164 elseif msgcontains(string.lower(msg), "red") then aurakpdo = 168 elseif msgcontains(string.lower(msg), "purple") then aurakpdo = 208 else return selfSay("Sorry dont have this aura,have green aura, yellow aura, orange aura,cyan aura, grey aura, blue aura, red aura, purple aura") end if candy >= 199 then if(doPlayerRemoveItem(cid, 2145, 10) == true) then doItemSetAttribute(pokemondoido.uid, "aura", aurakpdo) talkState[talkUser] = 0 return selfSay("Nice guy take this !") else return selfSay("Please i trade only 10 diamonds and pokemon +199") end else return selfSay("Please i trade only 10 diamonds and pokemon +199") end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Já especifiquei esse código no xml ( DATA/NPC/AURA.XML) Spoiler <npc name="Aurora" script="data/npc/scripts/aura.lua" walkinterval="0" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="289" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. ! I can sell auras you need help?" /> <parameter key="message_farewell" value="Good bye!"/> <parameter key="message_idletimeout" value="Good bye!"/> <parameter key="message_walkaway" script="Good Bye!"/> </parameters> </npc> Além disso estou usando os seguintes códigos: no caminho (DATA/CREATURESCRIPTS/SCRIPTS/aura.lua Spoiler function onThink(cid, interval) doSendMagicEffect(getCreaturePosition(cid), getPlayerStorageValue(cid, 8089)) return True end e no caminho (DATA/CREATURESCRIPTS/creaturescripts.xml Spoiler <event type="think" name="Aura" event="script" value="aura.lua"/> Agradeço a quem puder ajudar!! estou ficando louco com esse erro!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.