Kurobisu 73 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 (editado) Pedido: Npc que troca 10 Diamond por 30 Dias Vip / Premium Days Meu servidor é um de Poketibia 8.54 Agradeço... Editado Outubro 28, 2012 por Kurobisu Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/ Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 ja existe esse script, só procurar. Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375430 Compartilhar em outros sites More sharing options...
LuckOake 400 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Área errada, movido. Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375444 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 28, 2012 Share Postado Outubro 28, 2012 Aqui tem um, tinha no server do slicer '-' 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'Offer')) then selfSay('I sell Premium accounts.', cid) elseif(msgcontains(msg, 'premium account') or msgcontains(msg, 'Premium Account')) then selfSay('Premium Account users are able to use ride, teleport and fly. They can also wear all clothes, rent houses and costumize poké balls. Finally, premium account users have access to the saffari zone and are free of taxes in the casino! If you would like to upgrade your account for a month you will have to pay me 10 diamonds. Would you like to upgrade it?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'bless') or msgcontains(msg, 'Bless')) then selfSay('To be blessed 3 diamonds are necessary, would you like to go on?', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Change Sex') or msgcontains(msg, 'change sex')) then selfSay('To change sex 5 diamonds are necessary, would you like to go on?', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Hometown') or msgcontains(msg, 'hometown')) then selfSay('To change your hometown five diamonds are needed, what the city wants to choose?', cid) talkState[talkUser] = 4 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 6527, 10) == true) then selfSay('Thanks!', cid) doPlayerAddPremiumDays(cid, 30) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then selfSay('You have already got one or more blessings!', cid) else if(doPlayerRemoveItem(cid, 2145, 3) == true) then selfSay('Thanks!', cid) doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then doPlayerSetSex(cid, PLAYERSEX_MALE) else doPlayerSetSex(cid, PLAYERSEX_FEMALE) end talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'saffron') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 1) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'cerulean') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 2) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'lavender') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 3) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'fuchsia') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 4) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 4) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'celadon') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 5) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'viridian') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 6) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'pewter') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 8) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'vermilion') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 9) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'cinnabar') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 10) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375447 Compartilhar em outros sites More sharing options...
Kurobisu 73 Postado Outubro 29, 2012 Autor Share Postado Outubro 29, 2012 @Cleberadm Tem como você explicar issu? Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375487 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 Explicar como coloca ele? vai em data/npc/ Cria um arquivo .XML chamado premium.xml e coloca isso dentro: <?xml version="1.0" encoding="UTF-8"?> <npc name="Dalk" script="scripts/premium.lua" walkinterval="3000" floorchange="0" access="5" > <health now="150" max="150"/> <look type="522" head="0" body="114" legs="114" feet="0"/> <parameters> <parameter key="message_greet" value="Welcome to the diamond store, here you are able to upgrade your account to 'premium account' (10D), change your 'hometown'(5D), 'change sex'(5D) and 'bless'(3D)."/> <parameter key="message_farewell" value="Bye! See you next time."/> </parameters> </npc> E depois vai em data/npcs/scripts e cria um arquivo.LUA chamado premium E cola o que tem no spoiler lá emcima... Se for pra como ele funciona.. diz ai que tento explicar tambem Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375507 Compartilhar em outros sites More sharing options...
Kurobisu 73 Postado Outubro 29, 2012 Autor Share Postado Outubro 29, 2012 era pra como ele funciona mais mesmo assim ajudo, se explica o como funciona vai ajudar mais ainda. Meu rep mesmo assim... Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375633 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 Vou explicar no script mesmo ok? vou colocar no lado de cada 1 -- EXPLICAÇÃO Ai posto.. peria Aqui ó o script todo explicado ^^ 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'Offer')) then -- O que o player vai falar depois do HI selfSay('I sell Premium accounts.', cid) -- o que o npc vai falar elseif(msgcontains(msg, 'premium account') or msgcontains(msg, 'Premium Account')) then-- O que o player vai falar depois do HI selfSay('Premium Account users are able to use ride, teleport and fly. They can also wear all clothes, rent houses and costumize poké balls. Finally, premium account users have access to the saffari zone and are free of taxes in the casino! If you would like to upgrade your account for a month you will have to pay me 10 diamonds. Would you like to upgrade it?', cid)-- o que o npc vai falar talkState[talkUser] = 1 elseif(msgcontains(msg, 'bless') or msgcontains(msg, 'Bless')) then-- O que o player vai falar depois do HI selfSay('To be blessed 3 diamonds are necessary, would you like to go on?', cid) -- o que o npc vai falar talkState[talkUser] = 2 elseif(msgcontains(msg, 'Change Sex') or msgcontains(msg, 'change sex')) then-- O que o player vai falar depois do HI selfSay('To change sex 5 diamonds are necessary, would you like to go on?', cid) -- o que o npc vai falar talkState[talkUser] = 3 elseif(msgcontains(msg, 'Hometown') or msgcontains(msg, 'hometown')) then-- O que o player vai falar depois do HI selfSay('To change your hometown five diamonds are needed, what the city wants to choose?', cid) -- o que o npc vai falar talkState[talkUser] = 4 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then -- Se o player falar YES no premium account if(doPlayerRemoveItem(cid, 6527, 10) == true) then -- vai remover o item do player ( 6527 ) 10 unidades selfSay('Thanks!', cid) -- vNpc vai falar isso doPlayerAddPremiumDays(cid, 30) -- vai dar ao player 30 dias de premium talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) --- se nao tiver grana vai falar isso talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then -- se falar yes no blesss if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then -- vai verificar se o player já NAO TEM todas... selfSay('You have already got one or more blessings!', cid) -- se ele tiver vai falar isso else if(doPlayerRemoveItem(cid, 2145, 3) == true) then -- se nao tiver ele vai tirar do player o item(2145 ) 3 unidades selfSay('Thanks!', cid) -- vai falar isso doPlayerAddBlessing(cid, 1) --vai dar ao player a bless1 doPlayerAddBlessing(cid, 2) --vai dar ao player a bless2 doPlayerAddBlessing(cid, 3) --vai dar ao player a bless3 doPlayerAddBlessing(cid, 4) --vai dar ao player a bless4 doPlayerAddBlessing(cid, 5) --vai dar ao player a bles5 talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) -- se nao tiver a grana ou item vai falar isso talkState[talkUser] = 0 end end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then -- se falar yes no changesex if(doPlayerRemoveItem(cid, 2145, 5) == true) then -- remover o item dnv~~ selfSay('Thanks!', cid) --npc falar if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then-- SE o sexo do player for FEMALE... doPlayerSetSex(cid, PLAYERSEX_MALE)--- vai transformar para MALE else -- E SE for MALE doPlayerSetSex(cid, PLAYERSEX_FEMALE) -- vai transforma pra FEMALE end talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) -- se nao tiver os itens... talkState[talkUser] = 0 end elseif(msgcontains(msg, 'saffron') and talkState[talkUser] == 4) then -- AGORA é das cidades... se a mensagem for saffron if(doPlayerRemoveItem(cid, 2145, 5) == true) then -- verifica os itens e remove selfSay('Thanks!', cid) doPlayerSetTown(cid, 1) -- muda a cidade do player pra TOWN 1 que seria SAFRFON // o resto é mesma coisa... talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'cerulean') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 2) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'lavender') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 3) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'fuchsia') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 4) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 4) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'celadon') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 5) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'viridian') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 6) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'pewter') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 8) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'vermilion') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 9) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'cinnabar') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 10) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375695 Compartilhar em outros sites More sharing options...
Prezyoso 44 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 Movido. Att, Prezyoso Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375892 Compartilhar em outros sites More sharing options...
Kurobisu 73 Postado Outubro 29, 2012 Autor Share Postado Outubro 29, 2012 Pedido resolvido, pésso que fechem o tópico. Muito obrigado pela colaboração... Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375906 Compartilhar em outros sites More sharing options...
GuhPk 111 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 Duvida sanada. Reportado para que fechem e movam. Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375907 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 /\ amigo por favor olhe antes de reportar um topico q ja tinha sido movido! Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375914 Compartilhar em outros sites More sharing options...
Session Start 125 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 (editado) SAHUUHASHUSAHU não sei se voces 2 viram MAS JA TAVA MOVIDO kkkkkkkk Postado: Há 34 minutos Movido. Att, Prezyoso ;s comentei junto com slicer ;s Editado Outubro 29, 2012 por Cleberadm Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375916 Compartilhar em outros sites More sharing options...
Prezyoso 44 Postado Outubro 29, 2012 Share Postado Outubro 29, 2012 Como o dono do tópico pediu, Fechado. Link para o comentário https://xtibia.com/forum/topic/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1375924 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/197700-encerrado-pedidonpc-que-troca-diamond-por-vip-days/#findComment-1732420 Compartilhar em outros sites More sharing options...
Posts Recomendados