projectone 0 Postado Dezembro 20, 2012 Share Postado Dezembro 20, 2012 Olá gostaria de saber se alguem ai tem o script de cassino no qual o npc vende os coins.. estou com o script de compra de eevee e porygon do '"Slicer" no qual funciona bem.. para mim porem o npc nao vende as coins. '-' se alguem ai puder arruma a script ow me arrumar outra eu dou rep+++++ P.S: nao sei como postar como spoiler a script intao se alguem precisar do meu script que tenho aqui.. é o mesmo do Slicer ow intao é só me avisa que eu posto ake.. Obrigado! Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/ Compartilhar em outros sites More sharing options...
Deadpool 862 Postado Dezembro 20, 2012 Share Postado Dezembro 20, 2012 Area Incorreta, Area Correta, Pedidus E Duvidas - Servidores Derivados Reportado~~ Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/#findComment-1418621 Compartilhar em outros sites More sharing options...
Akatsukyi 23 Postado Dezembro 20, 2012 Share Postado Dezembro 20, 2012 @topic Não entendi mt bem. @project mas amigo para usa spoiler é simples faça como o modelo a seguir. [spoiler'] Text [/spoiler'] você colocar [spoiler'] sem o ' , depois adiciona o seu texto , e para fecha-lo você coloca [/spoiler'] sem o ' mas não coloque efeito nele que ele pode não abrir depois Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/#findComment-1418622 Compartilhar em outros sites More sharing options...
projectone 0 Postado Dezembro 21, 2012 Autor Share Postado Dezembro 21, 2012 eu gostaria de arrumar a script do npc do cassino do meu servidor poketibia,stigal.. eu peguei a script do Slicer no qual eu posso falar -hi pokemon Eevee/Porygon- e o npc responde e vende o pokemon por cassino coins.. porem o unico problema que encontrei é que o npc do cassino nao está vendendo as coins.. intendeu? eu falo pra ele buy coins,buy cassino coins ow até mesmo dou 1 olhada no script dele e nao encontro nenhum comando para comprar cassino coins com ele.. se puder me ajudar ai eu do rep++++ varios dias Obrigado segue spoiler do script que tenho local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end 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 function buyPoke(cid, pokemon, price, lvl) if pokemon == "" then return true end local gender = getRandomGenderByName(pokemon) local mypoke = getPokemonStatus(pokemon) if not mypoke then return true end local level = lvl local extrastr = 1.5 local btype = "normal" local offense = mypoke.off * level * extrastr local defense = mypoke.def * level * extrastr local speed = mypoke.agi * level * extrastr local vit = mypoke.vit * level * extrastr local spatk = mypoke.spatk * level * extrastr local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) if getPlayerFreeCap(cid) >= 6 or getContainerSize(getPlayerSlotItem(cid, 3).uid) >= 18 then item = doCreateItemEx(11826) else item = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, 11826, 1) end doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "level", level) doItemSetAttribute(item, "exp", leveltable[level]) doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(item, "offense", offense) doItemSetAttribute(item, "defense", defense) doItemSetAttribute(item, "speed", speed) doItemSetAttribute(item, "vitality", vit) doItemSetAttribute(item, "specialattack", spatk) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") if getPlayerFreeCap(cid) >= 6 or getContainerSize(getPlayerSlotItem(cid, 3).uid) >= 18 then doPlayerSendMailByName(getCreatureName(cid), item, 1) end setPlayerStorageValue(cid, 23254, getPlayerStorageValue(cid, 23254) - price) end ------------------------------------------------------------------------------ if msgcontains(msg, 'pokemon') then selfSay("Hello ".. getCreatureName(cid) .. ", I have two Pokemons to choose one among them, {Eevee} and {Porygon}, which would you choose? ", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'Eevee') or msgcontains(msg, 'eevee')) and talkState[cid] == 1 then selfSay("Are you sure you want buy an Eevee for 22000 cassino coins?", cid) talkState[cid] = 2 elseif (msgcontains(msg, 'Porygon') or msgcontains(msg, 'porygon')) and talkState[cid] == 1 then selfSay("Are you sure you want buy an Porygon for 45000 cassino coins?", cid) talkState[cid] = 3 elseif (msgcontains(msg, 'nao') or msgcontains(msg, 'no')) and talkState[cid] == 2 then selfSay("Did not like this choice? You can choose one {Porygon} too.", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'nao') or msgcontains(msg, 'no')) and talkState[cid] == 3 then selfSay("Did not like this choice? You can choose one {Eevee} too.", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 2 then if getPlayerStorageValue(cid, 23254) >= 22000 then local pokemon = "Eevee" local price = 22000 local lvl = 20 buyPoke(cid, pokemon, price, lvl) selfSay("Here you are! You have just bought an "..pokemon.." for "..price.." casino coins!", cid) talkState[cid] = 0 else selfSay("You don't have enought cassino coins!", cid) talkState[cid] = 0 end elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 3 then if getPlayerStorageValue(cid, 23254) >= 45000 then local pokemon = "Porygon" local price = 45000 local lvl = 40 buyPoke(cid, pokemon, price, lvl) selfSay("Here you are! You have just bought an "..pokemon.." for "..price.." casino coins!", cid) talkState[cid] = 0 else selfSay("You don't have enought cassino coins!", cid) talkState[cid] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/#findComment-1418665 Compartilhar em outros sites More sharing options...
Yan Oliveira 215 Postado Dezembro 21, 2012 Share Postado Dezembro 21, 2012 Tópico Movido para Pedidos e Duvidas - Servidores Derivados. Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/#findComment-1418688 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Abril 20, 2018 Share Postado Abril 20, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/202032-encerrado-cassino/#findComment-1733246 Compartilhar em outros sites More sharing options...
Posts Recomendados