Ir para conteúdo
  • 0

ERRO CHARGES COLAR


alexpaimel2

Pergunta

Fala galera, beleza?

Basicamente meu erro está sendo;
Eu configuro o amuleto para ficar com X charge, ele fica normalmente. Porém quando eu adiciono no NPC ele o vende por apenas 1 charge, invés de 100 (já configurado). Porém se eu faço com o GOD o amuleto está com as 100 charges funcionando normalmente.

Script NPC:

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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')
shopModule:addBuyableItem({'VIP sword'}, 8932, 20000000, 1, 'VIP Sword')
shopModule:addBuyableItem({'VIP axe'}, 8293, 20000000, 1, 'VIP Axe')
shopModule:addBuyableItem({'VIP star'}, 7366, 20000000, 1, 'VIP Star')
shopModule:addBuyableItem({'VIP club'}, 8929, 20000000, 1, 'VIP Club')
shopModule:addBuyableItem({'VIP wand'}, 7414, 20000000, 1, 'VIP Wand')
shopModule:addBuyableItem({'VIP rod'}, 7958, 20000000, 1, 'VIP Rod')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Script amuleto (é um glacial, somente editei os atributos):
    </item>
    <item id="7888" article="a" name="Vip Amulet">
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="100" />
        <attribute key="showcharges" value="1" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentPhysical" value="60" />
        <attribute key="absorbPercentDeath" value="40" />
        <attribute key="absorbPercentEarth" value="40" />
        <attribute key="absorbPercentFire" value="40" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentEnergy" value="-10" />
        <attribute key="showattributes" value="1" />
    </item>

shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')

nessa parte eu coloquei shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 10, 'VIP Amulet') - ele ficou com 10 de cargas, mas depois eu tentei 100 e não deu certo. Depois tentei voltar pra 10 e nem isso deu, tentei colocar 10000, 100000 e nada de mudar de 1 charge.

mas ta estranho kk, qnd eu coloco pelo RME ele ta ficndo com 200 charges, se eu faço pelo GOD ele fica com 100 e se vende pelo NPC fica com 1...

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Tenta esse codigo:

 

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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')
shopModule:addBuyableItem({'VIP sword'}, 8932, 20000000, 1, 'VIP Sword')
shopModule:addBuyableItem({'VIP axe'}, 8293, 20000000, 1, 'VIP Axe')
shopModule:addBuyableItem({'VIP star'}, 7366, 20000000, 1, 'VIP Star')
shopModule:addBuyableItem({'VIP club'}, 8929, 20000000, 1, 'VIP Club')
shopModule:addBuyableItem({'VIP wand'}, 7414, 20000000, 1, 'VIP Wand')
shopModule:addBuyableItem({'VIP rod'}, 7958, 20000000, 1, 'VIP Rod')
shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Script amuleto (é um glacial, somente editei os atributos):
    </item>
    <item id="7888" article="a" name="Vip Amulet">
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="100" />
        <attribute key="showcharges" value="1" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentPhysical" value="60" />
        <attribute key="absorbPercentDeath" value="40" />
        <attribute key="absorbPercentEarth" value="40" />
        <attribute key="absorbPercentFire" value="40" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentEnergy" value="-10" />
        <attribute key="showattributes" value="1" />
    </item>

 

Link para o comentário
Compartilhar em outros sites

  • 0
Em 12/12/2019 em 23:52, brazvct disse:

Tenta esse codigo:

 


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

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')
shopModule:addBuyableItem({'VIP sword'}, 8932, 20000000, 1, 'VIP Sword')
shopModule:addBuyableItem({'VIP axe'}, 8293, 20000000, 1, 'VIP Axe')
shopModule:addBuyableItem({'VIP star'}, 7366, 20000000, 1, 'VIP Star')
shopModule:addBuyableItem({'VIP club'}, 8929, 20000000, 1, 'VIP Club')
shopModule:addBuyableItem({'VIP wand'}, 7414, 20000000, 1, 'VIP Wand')
shopModule:addBuyableItem({'VIP rod'}, 7958, 20000000, 1, 'VIP Rod')
shopModule:addBuyableItem({'VIP amulet'}, 7888, 15000000, 1, 'VIP Amulet')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Script amuleto (é um glacial, somente editei os atributos):
    </item>
    <item id="7888" article="a" name="Vip Amulet">
        <attribute key="weight" value="500" />
        <attribute key="slotType" value="necklace" />
        <attribute key="charges" value="100" />
        <attribute key="showcharges" value="1" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentPhysical" value="60" />
        <attribute key="absorbPercentDeath" value="40" />
        <attribute key="absorbPercentEarth" value="40" />
        <attribute key="absorbPercentFire" value="40" />
        <attribute key="absorbPercentIce" value="40" />
        <attribute key="absorbPercentEnergy" value="-10" />
        <attribute key="showattributes" value="1" />
    </item>

 

Testado e mesmo assim ficou com 1 charge ;/

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...