DenuvoEtheriongames - Designing Your Entertainment.DConde
info
Grupo: Conde
Registrado: 30/04/11
Posts: 658
Reputação: +71
Gênero: Masculino
Char no Tibia: ExTibiano
03 de agosto de 2016 às 12:50
Olá pessoal, tenho esse script que troca um item por outro, no caso um poke por outro, mas acontece que quando é feita a troca, a ball vem em "Unique Item"
dai não é possível fazer troca e nem jogar fora... alguém poderia me ajudar a deixa a pokebola normal sem esse unique item por favor?
agradeço pela atenção, obrigado!
Spoiler
if (msgcontains(msg, 'Shiny') or msgcontains(msg, 'shiny')) then --alterado v1.7
selfSay("Para transformar seu Ditto em Shiny, voce precisa do Ditto+50 + 80kk para a realização do processo. Voce deseja realizar essa transformacao?", cid) talkState[talkUser] = 1 elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then if getPlayerSlotItem(cid, 8).uid <= 0 then selfSay("Desculpe, voce nao esta com o pokemon no slot!", cid) talkState[talkUser] = 0 return true end --alterado v1.2 if #getCreatureSummons(cid) >= 1 then selfSay("Puxe seu pokemon para pokebola!", cid) talkState[talkUser] = 0 return true end
local pb = getPlayerSlotItem(cid, 8).uid
if getItemAttribute(pb, "poke") ~= "Ditto" then selfSay("Coloca seu Ditto+50 no slot por favor!", cid) talkState[talkUser] = 0 return true end
if not getItemAttribute(pb, "boost") or getItemAttribute(pb, "boost") < 50 then selfSay("Desculpe seu Ditto nao esta boosted +50!", cid) talkState[talkUser] = 0 return true end --100000 = 1k, 1000000 = 10k, 10000000 = 100k if doPlayerRemoveMoney(cid, 800000000) == true then selfSay("So there is it! Enjoy!", cid) doItemSetAttribute(pb, "hp", 1) doItemSetAttribute(pb, "poke", "Shiny Ditto") doItemSetAttribute(pb, "description", "Contains a Shiny Ditto.") doItemEraseAttribute(pb, "boost") doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos["Shiny Ditto"])
if useKpdoDlls then doCreatureExecuteTalkAction(cid, "/pokeread") end talkState[talkUser] = 0 return true else selfSay("Voce nao tem dinheiro suficiente!", cid) talkState[talkUser] = 0 return true end end
info
Grupo: Conde
Registrado: 30/04/11
Posts: 658
Reputação: +71
Gênero: Masculino
Char no Tibia: ExTibiano
Olá pessoal, tenho esse script que troca um item por outro, no caso um poke por outro, mas acontece que quando é feita a troca, a ball vem em "Unique Item"
dai não é possível fazer troca e nem jogar fora... alguém poderia me ajudar a deixa a pokebola normal sem esse unique item por favor?
agradeço pela atenção, obrigado!
if (msgcontains(msg, 'Shiny') or msgcontains(msg, 'shiny')) then --alterado v1.7
selfSay("Para transformar seu Ditto em Shiny, voce precisa do Ditto+50 + 80kk para a realização do processo. Voce deseja realizar essa transformacao?", cid)
talkState[talkUser] = 1
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 1 then
if getPlayerSlotItem(cid, 8).uid <= 0 then
selfSay("Desculpe, voce nao esta com o pokemon no slot!", cid)
talkState[talkUser] = 0
return true
end
--alterado v1.2
if #getCreatureSummons(cid) >= 1 then
selfSay("Puxe seu pokemon para pokebola!", cid)
talkState[talkUser] = 0
return true
end
local pb = getPlayerSlotItem(cid, 8).uid
if getItemAttribute(pb, "poke") ~= "Ditto" then
selfSay("Coloca seu Ditto+50 no slot por favor!", cid)
talkState[talkUser] = 0
return true
end
if not getItemAttribute(pb, "boost") or getItemAttribute(pb, "boost") < 50 then
selfSay("Desculpe seu Ditto nao esta boosted +50!", cid)
talkState[talkUser] = 0
return true
end
--100000 = 1k, 1000000 = 10k, 10000000 = 100k
if doPlayerRemoveMoney(cid, 800000000) == true then
selfSay("So there is it! Enjoy!", cid)
doItemSetAttribute(pb, "hp", 1)
doItemSetAttribute(pb, "poke", "Shiny Ditto")
doItemSetAttribute(pb, "description", "Contains a Shiny Ditto.")
doItemEraseAttribute(pb, "boost")
doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos["Shiny Ditto"])
doItemSetAttribute(pb, "Icone", "yes")
doTransformItem(pb, icons[getItemAttribute(pb, "poke")].on)
if useKpdoDlls then
doCreatureExecuteTalkAction(cid, "/pokeread")
end
talkState[talkUser] = 0
return true
else
selfSay("Voce nao tem dinheiro suficiente!", cid)
talkState[talkUser] = 0
return true
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())