Ir para conteúdo

Vinix E. Michele

Membro
  • Registro em

  • Última visita

Tudo que Vinix E. Michele postou

  1. Vinix E. Michele postou uma resposta no tópico em Formação de Equipe
    Obrigado, sim eu sei ... estou no aguado
  2. Vinix E. Michele postou uma resposta no tópico em Formação de Equipe
    Ninguém se interessa?
  3. Vinix E. Michele postou uma resposta no tópico em Formação de Equipe
    Boa tarde a todos! A mais ou menos 2 meses venho trabalhando em um servidor 8.6 Global Full. Porém não estou conseguindo dar conta pois estou sozinho para fazer tudo. Desde a criação e expansão de mapas até a divulgação do servidor. O servidor atualmente está desligado, porém o host está pago e com vários dias para uso. Implantei algumas features bem bacanas que deixam o jogo ainda mais divertido como por exemplo • Addons que quando Full são animados • O Servidor possuí War System com Escudos, Sistema Vip, Areas Vip exclusivas... • Conta também com um sistema de recompença por Hit, existe uma chance de 25% de aparecer a mensagem referente ao poder do hit, por exemplo, se o player der um hit de no máximo 15, vai subir a msg, Fraco! se der um hit de max 100, vai subir uma msg, Forte !, max 250 a msg Super! e assim por diante ... deixando o jogo bem legal e competitivo. • Possuí também sistema Anti-Bot, que manda o player digitar !antibot e um número .. caso não digite ele é kikado. • Tem também um Lottery System que a cada 3 horas sorteia um player para ganhar um item ... • Possui também um sistema de task do vodkart que é muito bom, com os comandos !task e !taskrank... • Os addons são feitos por Items e quando full dão atributos... assim os players sempre querem ter aquele addon full respectivo para sua vocação que vai melhorar seus skills. • Tem os sistemas de Tetris, Jogo da cobrinha, Futebol ... tudo para divertir o jogador. • O Mapa é Global Full como já diz no nome do tópico ne.. O servidor possuí site.. http://gontechbr.servegame.com Qual é minha proposta ? Bem, minha proposta é a seguinte.. Fiz este servidor com o intuito de trazer a diversão para os jogadores, pois diferente dos outros servidores quem tem aos montes por aí que só visam o lucro e esquecem do rpg e da diversão, este servidor foi feito para que os amigos venham se divertir, travar guerras, fazer quests juntos, enfim, tudo que quiserem e tudo que um rpg de verdade deve oferecer ao jogador. Gostaria muito de formar uma equipe dedicada, assim como eu, que tem a vontade de criar um servidor com estes fins. Criar quests novas e originais, com sistemas novos, inovar o jogo mesmo! Fazer com que o player queira jogar o jogo. Este é meu objetivo. A criatividade e a dedicação sempre trazem bons resultados. Quanto ao host, eu sempre renovarei e sempre ficará online, isto é FATO. Quanto a isso não há problemas, UPtime é garantido. Porém é trabalho de mais para uma só pessoa. Gostaria de saber se alguém se interessa em fazer parte desta equipe e começar do zero se for preciso, a criar um servidor com este pensamento objetivo. Sei que um servidor toma muito tempo, e é preciso dedicação para tal, tenho meu trabalho e não vivo de jogo, mas muitos como eu fazem o que eu faço por prazer e se identificam e fazem valer a pena o tempo que podem dedicar ao server. Me disponho a mudar o nome do servidor, do projeto etc. Procuro mesmo uma equipe boa e qualificada para montarmos o melhor servidor possível =) Como eu já disse, estou sozinho para tudo. Então toda ajuda é bem vinda, desde que tenha os mesmos objetivos e se identifique com a ideia proposta. O time precisa de: • Mappers ( que entendam pelomenos o que estão fazendo.) • Scripters (para criarmos novos sistemas etc ) • Staff In-Game ( como CM's, Tutores , para auxiliar os jogadores e reportar bugs. ) • Spriters ( para inovar geral ) etc. Se alguem tiver algum interesse no que eu disse, seja bem vindo! só postar aí por favor Nome, idade, cargo, experiencia no cargo, disponibilidade para o projeto. Obrigado! Conto com vcs. Viniix
  4. não é real server. é TFS 0.4 DEV. alguem sabe como solucionar ?
  5. Boa noite! estava com problemas no meu ot, pois os players estao usando elf com akela maldita hotkey para comprar pots de graça e subir ml e tambem de comprar os items como joias e vender para ganhar dinheiro. fiz o processo que o skydangerous passou mas agr quando eu uso o novo distro compilado nenhum npc responde quando se fala hi aparece um erro em todos os npcs no distro usei o seguinte: em npc.cpp: if(NpcState* npcState = getState(player, true)) { npcState->amount = amount; npcState->subType = count; npcState->itemId = itemId; npcState->buyPrice = getListItemPrice(itemId, SHOPEVENT_BUY); npcState->ignoreCap = ignoreCap; npcState->inBackpacks = inBackpacks; const NpcResponse* response = getResponse(player, npcState, EVENT_PLAYER_SHOPBUY); executeResponse(player, npcState, response); } troquei tudo decima por este: if(NpcState* npcState = getState(player, true)) { if(amount <= 0){ amount = 1; } npcState->amount = amount; npcState->subType = count; npcState->itemId = itemId; npcState->buyPrice = getListItemPrice(itemId, SHOPEVENT_BUY); npcState->ignoreCap = ignoreCap; npcState->inBackpacks = inBackpacks; const NpcResponse* response = getResponse(player, npcState, EVENT_PLAYER_SHOPBUY); executeResponse(player, npcState, response); } alguem sabe alguma solução pra esses problemas ? não funcionou isso ai .. por favor, estes bugs estão me deixando maluco já. Obrigado!
  6. Eai vod ? testou ? viu as config do meu server que vc pediu ai em cima ?
  7. adicionei o arena e o arena kill depois do cid, e nao funcionou :/ arena continua bugada. quando mato o monstro e tento entrar no tp aparece: first kil the monster
  8. não é 9.5 é 8.6 o servidor.. vou dar uma verificada no script pra ver se tem algo da arena
  9. Vod, usei aki ! deu certo o sistema, mais não esta contando ! eu substitui td pelo grizzly adams, que tem já no ot, mais quando vc pede a task ou mata um bixo que tem no !task, ele não conta quando mata!
  10. login.lua né ? nao tem login.ini no creaturescripts.. aki esta ele, vc poderia verificar se esta ok ? local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } registerCreatureEvent(cid, "VipCheck") function onLogin(cid) accountManager = "Account Manager" managerCounter = 0 for i, player in ipairs(getOnlinePlayers()) do if accountManager:lower() == player:lower() then managerCounter = managerCounter + 1 end end if managerCounter >= 3 then return false end local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end registerCreatureEvent(cid, "Mail") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "Idle") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "demonOakLogout") registerCreatureEvent(cid, "demonOakDeath") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "VipReceive") registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "KillingInTheNameOf") registerCreatureEvent(cid, "Hitmsg") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "fullmh") if (InitArenaScript ~= 0) then InitArenaScript = 1 for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) end setPlayerStorageValue(cid, 42350, 0) setPlayerStorageValue(cid, 42352, 0) if getPlayerStorageValue(cid, 13541) == FALSE and (isInArray({9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}, getPlayerVocation(cid))) then doPlayerSetVocation(cid,getPlayerVocation(cid)-4) end return true end
  11. boa vod! usei aki, mas não tem os comandos de task na talkactions, tem como explicar como põe aki ? valeu mano. so falta isso pra fica bem configurado. obrigadao!
  12. boa tarde! e o seguinte ... as vezes quando um player esta em uma hunt e ele vai healar, a life trava ! a life fica travada, pode usar potion, magias de healing, tudo oque vc pensar , mas a life continua travada e o player morre. >.< esse erro ta foda , pois este tipo de bug é fatal para um servidor. alguem sabe arrumar ? pls , preciso mt de ajuda.
  13. Por favor ninguem sabe arrumar ?? :/
  14. boa noite meus amigos ! a arena do meu server ta bugada! quando o player entra pra faze-la e mata o bixo e vai entrar no teleport aparece a msg = First kill monster! e o player nao passa para a proxima sala. alguem saberia como arrumar ?? Mt obrigado desde já !
  15. valeu pela ajuda mano! vou testar e ja posto se deu certo ..
  16. valeu lano! vc pode conferir por favor se as outras vocs estao corretas? nao quero que aumente o dano de nenhuma, nem das vips, vc sabe se ja estao corretas? valendo REPS
  17. Boa noite galera! testando meu servidor aki reparei que o dano está muito alto de paladins. um paladin com skill 69 esta dando hits de quase 300 em dragon e dl com royal spear. realmente ta mt alto ! como arrumo isso ? aki esta miha vocations.xml <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.4" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="10" gainmanaticks="2" gainmanaamount="5" manamultiplier="3.0" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="15" manamultiplier="1.4" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="35" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="20" gainmanaticks="1" gainmanaamount="15" manamultiplier="3.0" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="9" name="Soul Sorcerer" description="a soul sorcerer" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Shamanic Druid" description="a shamanic druid" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Bright Paladin" description="a bright paladin" needpremium="1" gaincap="22" gainhp="11" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.4" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Blade Knight" description="a blade knight" needpremium="1" gaincap="47" gainhp="25" gainmana="6" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="25" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="13" name="Soul Master Sorcerer" description="a soul master sorcerer" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="9" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="14" name="Shamanic Elder Druid" description="a shamanic elder druid" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="10" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="15" name="Bright Royal Paladin" description="a bright royal paladin" needpremium="1" gaincap="24" gainhp="12" gainmana="25" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.4" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="16" name="Blade Elite Knight" description="a blade elite knight" needpremium="1" gaincap="49" gainhp="35" gainmana="7" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="35" manamultiplier="3.0" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="17" name="Infernatil Soul Sorcerer" description="an infernatil soul sorcerer" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="13" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="18" name="Ancient Shamanic Druid" description="an ancient shamanic druid" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="14" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="19" name="Divine Bright Paladin" description="a divine bright paladin" needpremium="1" gaincap="23" gainhp="13" gainmana="30" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="45" manamultiplier="1.4" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="20" name="Gladiator Blade Knight" description="a gladiator blade knight" needpremium="1" gaincap="51" gainhp="45" gainmana="9" gainhpticks="8" gainhpamount="20" gainmanaticks="4" gainmanaamount="45" manamultiplier="3.0" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="16" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> --> </vocations>
  18. opa, belezura, vou testar agora mesmo ! ja te falo se deu certo. .. Blz Vod, mas ele só ta promovendo uma promotion só, testei com um knight, e ele vira Blade Knight, e perde os 10 golden nuggets, perfeito! mas quando eu tento comprar novamente a promotion, para ele subir para blade elite knight, o npc diz que Já fui promovido! não tem problema se precisar criar outro npc, se o problema for este eu faço outro, só preciso que o player seje promovido mais 2 vezes. como faço isso ?
  19. Pow que top hein! parabens mesmo, vou usar no meu servidor.. e o sistema de rank ? fez ? se fazer vai ficar top top top !
  20. Vod, ta dando o seguinte erro, http://imageshack.us/f/844/erro.gif E as promotions estão trocadas ... Quando digo, first promote, o npc nao fala absolutamente nada. quando digo second promote ele promove o player para a 3º promotion da lista e quando digo third , ele promove para a 2º promo da lista e outra coisa, não está retirando os gold nuggets da bp! quando o player nao tem os gold nuggets, ele avisa que não tem, mas quando o player tem a quantia certa ou mais, ele não tira o item da bp e promove o player errado. ta quase certinho, so falta configurar essas coisas! OBS: SE eu trocar o meu npc > lib > npcsystem > modules.lua, que está anexado la no post de cima pra vc ver, pelo seu da um erro no ot q nenhum npc aparece mais! sumiu tudo. então tenho que continuar com o meu ..
  21. Queen Eloise.XML <?xml version="1.0" encoding="UTF-8"?> <npc name="Queen Eloise" script="data/npc/scripts/Queen Eloise.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="331" head="96" body="94" legs="79" feet="115" addons="0"/> <parameters> <parameter key="message_greet" value="I greet thee, my loyal subject."/> <parameter key="message_farewell" value="Farewell, |PLAYERNAME|"/> <parameter key="message_walkaway" value="Farewell, |PLAYERNAME|" /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;king;" /> <parameter key="keyword_reply1" value="I am Queen Eloise. It is my duty to reign over this marvellous city and the lands of the north." /> <parameter key="keyword_reply2" value="I am the Queen, the only rightful ruler on the continent!" /> </parameters> </npc> Queen Eloise.lua: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to be promoted in your vocation for 20000 gold?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) --[[ local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'}) node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) ]]-- npcHandler:addModule(FocusModule:new()) VOU DAR UMA TESTADA E JA TE DIGO SE DEU CERTO ! DETALHE, MEU MODULES.LUA NÃO É IGUAL AO SEU, É ESTE: -- Advanced NPC System (Created by Jiddo), -- Modified by Talaturen. -- Modified by Elf. if(Modules == nil) then -- default words for greeting and ungreeting the npc. Should be a table containing all such words. FOCUS_GREETWORDS = {'hi', 'hello', 'hey'} FOCUS_FAREWELLWORDS = {'bye', 'farewell', 'cya'} -- The words for requesting trade window. SHOP_TRADEREQUEST = {'offer', 'trade'} -- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! Should be a teble with a single string value. SHOP_YESWORD = {'yes'} SHOP_NOWORD = {'no'} -- Pattern used to get the amount of an item a player wants to buy/sell. PATTERN_COUNT = '%d+' -- Constants used to separate buying from selling. SHOPMODULE_SELL_ITEM = 1 SHOPMODULE_BUY_ITEM = 2 SHOPMODULE_BUY_ITEM_CONTAINER = 3 -- Constants used for shop mode. Notice: addBuyableItemContainer is working on all modes SHOPMODULE_MODE_TALK = 1 -- Old system used before Tibia 8.2: sell/buy item name SHOPMODULE_MODE_TRADE = 2 -- Trade window system introduced in Tibia 8.2 SHOPMODULE_MODE_BOTH = 3 -- Both working at one time -- Used shop mode SHOPMODULE_MODE = SHOPMODULE_MODE_BOTH Modules = { parseableModules = {} } StdModule = {} -- These callback function must be called with parameters.npcHandler = npcHandler in the parameters table or they will not work correctly. -- Notice: The members of StdModule have not yet been tested. If you find any bugs, please report them to me. -- Usage: -- keywordHandler:addKeyword({'offer'}, StdModule.say, {npcHandler = npcHandler, text = 'I sell many powerful melee weapons.'}) function StdModule.say(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if(npcHandler == nil) then error('StdModule.say called without any npcHandler instance.') end local onlyFocus = (parameters.onlyFocus == nil or parameters.onlyFocus == true) if(not npcHandler:isFocused(cid) and onlyFocus) then return false end local parseInfo = {[TAG_PLAYERNAME] = getCreatureName(cid)} npcHandler:say(npcHandler:parseMessage(parameters.text or parameters.message, parseInfo), cid, parameters.publicize and true) if(parameters.reset == true) then npcHandler:resetNpc() elseif(parameters.moveup ~= nil and type(parameters.moveup) == 'number') then npcHandler.keywordHandler:moveUp(parameters.moveup) end return true end --Usage: -- local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) -- node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, promotion = 1, level = 20}, text = 'Congratulations! You are now promoted.') -- node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Alright then, come back when you are ready.'}, reset = true) function StdModule.promotePlayer(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if(npcHandler == nil) then error('StdModule.promotePlayer called without any npcHandler instance.') end if(not npcHandler:isFocused(cid)) then return false end if(isPlayerPremiumCallback(cid) or not getBooleanFromString(getConfigValue('premiumForPromotion')) or not(parameters.premium)) then if(getPlayerPromotionLevel(cid) >= parameters.promotion) then npcHandler:say('You are already promoted!', cid) elseif(getPlayerLevel(cid) < parameters.level) then npcHandler:say('I am sorry, but I can only promote you once you have reached level ' .. parameters.level .. '.', cid) elseif(not doPlayerRemoveMoney(cid, parameters.cost)) then npcHandler:say('You do not have enough money!', cid) else setPlayerPromotionLevel(cid, parameters.promotion) npcHandler:say(parameters.text, cid) end else npcHandler:say("You need a premium account in order to get promoted.", cid) end npcHandler:resetNpc() return true end function StdModule.learnSpell(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if(npcHandler == nil) then error('StdModule.learnSpell called without any npcHandler instance.') end if(not npcHandler:isFocused(cid)) then return false end if(isPlayerPremiumCallback(cid) or not(parameters.premium)) then if(getPlayerLearnedInstantSpell(cid, parameters.spellName)) then npcHandler:say('You already know this spell.', cid) elseif(getPlayerLevel(cid) < parameters.level) then npcHandler:say('You need to obtain a level of ' .. parameters.level .. ' or higher to be able to learn ' .. parameters.spellName .. '.', cid) elseif(getPlayerVocation(cid) ~= parameters.vocation and getPlayerVocation(cid) ~= parameters.vocation + 4 and vocation ~= 9) then npcHandler:say('This spell is not for your vocation', cid) elseif(not doPlayerRemoveMoney(cid, parameters.price)) then npcHandler:say('You do not have enough money, this spell costs ' .. parameters.price .. ' gold.', cid) else npcHandler:say('You have learned ' .. parameters.spellName .. '.', cid) playerLearnInstantSpell(cid, parameters.spellName) end else npcHandler:say('You need a premium account in order to buy ' .. parameters.spellName .. '.', cid) end npcHandler:resetNpc() return true end function StdModule.bless(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if(npcHandler == nil) then error('StdModule.bless called without any npcHandler instance.') end if(not npcHandler:isFocused(cid) or getWorldType() == WORLD_TYPE_PVP_ENFORCED) then return false end if(isPlayerPremiumCallback(cid) or not getBooleanFromString(getConfigValue('blessingsOnlyPremium')) or not parameters.premium) then local price = parameters.baseCost if(getPlayerLevel(cid) > parameters.startLevel) then price = (price + ((math.min(parameters.endLevel, getPlayerLevel(cid)) - parameters.startLevel) * parameters.levelCost)) end if(getPlayerBlessing(cid, parameters.number)) then npcHandler:say("Gods have already blessed you with this blessing!", cid) elseif(not doPlayerRemoveMoney(cid, price)) then npcHandler:say("You don't have enough money for blessing.", cid) else npcHandler:say("You have been blessed by one of the five gods!", cid) doPlayerAddBlessing(cid, parameters.number) end else npcHandler:say('You need a premium account in order to be blessed.', cid) end npcHandler:resetNpc() return true end function StdModule.travel(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if(npcHandler == nil) then error('StdModule.travel called without any npcHandler instance.') end if(not npcHandler:isFocused(cid)) then return false end if(parameters.premium and not isPlayerPremiumCallback(cid)) then npcHandler:say('I can only allow premium players to travel with me.', cid) elseif(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid) elseif(parameters.storage ~= nil and getPlayerStorageValue(cid, parameters.storage) <= 0) then npcHandler:say(parameters.storageInfo or 'You may not travel here.', cid) elseif(not doPlayerRemoveMoney(cid, parameters.cost)) then npcHandler:say('You do not have enough money!', cid) elseif(isPlayerPzLocked(cid)) then npcHandler:say('Get out of there with this blood.', cid) else doTeleportThing(cid, parameters.destination, 0) doSendMagicEffect(parameters.destination, 10) end npcHandler:resetNpc() return true end FocusModule = { npcHandler = nil } -- Creates a new instance of FocusModule without an associated NpcHandler. function FocusModule:new() local obj = {} setmetatable(obj, self) self.__index = self return obj end -- Inits the module and associates handler to it. function FocusModule:init(handler) self.npcHandler = handler for i, word in pairs(FOCUS_GREETWORDS) do local obj = {} table.insert(obj, word) obj.callback = FOCUS_GREETWORDS.callback or FocusModule.messageMatcher handler.keywordHandler:addKeyword(obj, FocusModule.onGreet, {module = self}) end for i, word in pairs(FOCUS_FAREWELLWORDS) do local obj = {} table.insert(obj, word) obj.callback = FOCUS_FAREWELLWORDS.callback or FocusModule.messageMatcher handler.keywordHandler:addKeyword(obj, FocusModule.onFarewell, {module = self}) end return true end -- Greeting callback function. function FocusModule.onGreet(cid, message, keywords, parameters) parameters.module.npcHandler:onGreet(cid) return true end -- UnGreeting callback function. function FocusModule.onFarewell(cid, message, keywords, parameters) if(parameters.module.npcHandler:isFocused(cid)) then parameters.module.npcHandler:onFarewell(cid) return true else return false end end -- Custom message matching callback function for greeting messages. function FocusModule.messageMatcher(keywords, message) local spectators = getSpectators(getCreaturePosition(getNpcId()), 7, 7) for i, word in pairs(keywords) do if(type(word) == 'string') then if(string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]')) then if(string.find(message, getCreatureName(getNpcId()))) then return true end for i, uid in ipairs(spectators) do if(string.find(message, getCreatureName(uid))) then return false end end return true end end end return false end KeywordModule = { npcHandler = nil } -- Add it to the parseable module list. Modules.parseableModules['module_keywords'] = KeywordModule function KeywordModule:new() local obj = {} setmetatable(obj, self) self.__index = self return obj end function KeywordModule:init(handler) self.npcHandler = handler return true end -- Parses all known parameters. function KeywordModule:parseParameters() local ret = NpcSystem.getParameter('keywords') if(ret ~= nil) then self:parseKeywords(ret) end end function KeywordModule:parseKeywords(data) local n = 1 for keys in string.gmatch(data, '[^;]+') do local i = 1 local keywords = {} for temp in string.gmatch(keys, '[^,]+') do table.insert(keywords, temp) i = i + 1 end if(i ~= 1) then local reply = NpcSystem.getParameter('keyword_reply' .. n) if(reply ~= nil) then self:addKeyword(keywords, reply) else ----print('[Warning] NpcSystem:', 'Parameter \'' .. 'keyword_reply' .. n .. '\' missing. Skipping...') end else ----print('[Warning] NpcSystem:', 'No keywords found for keyword set #' .. n .. '. Skipping...') end n = n+1 end end function KeywordModule:addKeyword(keywords, reply) self.npcHandler.keywordHandler:addKeyword(keywords, StdModule.say, {npcHandler = self.npcHandler, onlyFocus = true, text = reply, reset = true}) end TravelModule = { npcHandler = nil, destinations = nil, yesNode = nil, noNode = nil, } -- Add it to the parseable module list. Modules.parseableModules['module_travel'] = TravelModule function TravelModule:new() local obj = {} setmetatable(obj, self) self.__index = self return obj end function TravelModule:init(handler) self.npcHandler = handler self.yesNode = KeywordNode:new(SHOP_YESWORD, TravelModule.onConfirm, {module = self}) self.noNode = KeywordNode:new(SHOP_NOWORD, TravelModule.onDecline, {module = self}) self.destinations = {} return true end -- Parses all known parameters. function TravelModule:parseParameters() local ret = NpcSystem.getParameter('travel_destinations') if(ret ~= nil) then self:parseDestinations(ret) self.npcHandler.keywordHandler:addKeyword({'destination'}, TravelModule.listDestinations, {module = self}) self.npcHandler.keywordHandler:addKeyword({'where'}, TravelModule.listDestinations, {module = self}) self.npcHandler.keywordHandler:addKeyword({'travel'}, TravelModule.listDestinations, {module = self}) end end function TravelModule:parseDestinations(data) for destination in string.gmatch(data, '[^;]+') do local i = 1 local name = nil local x = nil local y = nil local z = nil local cost = nil local premium = false for temp in string.gmatch(destination, '[^,]+') do if(i == 1) then name = temp elseif(i == 2) then x = tonumber(temp) elseif(i == 3) then y = tonumber(temp) elseif(i == 4) then z = tonumber(temp) elseif(i == 5) then cost = tonumber(temp) elseif(i == 6) then premium = temp == 'true' else print('[Warning] NpcSystem:', 'Unknown parameter found in travel destination parameter.', temp, destination) end i = i + 1 end if(name ~= nil and x ~= nil and y ~= nil and z ~= nil and cost ~= nil) then self:addDestination(name, {x=x, y=y, z=z}, cost, premium) else print('[Warning] NpcSystem:', 'Parameter(s) missing for travel destination:', name, x, y, z, cost, premium) end end end function TravelModule:addDestination(name, position, price, premium) table.insert(self.destinations, name) local parameters = { cost = price, destination = position, premium = premium, module = self } local keywords = {} table.insert(keywords, name) local keywords2 = {} table.insert(keywords2, 'bring me to ' .. name) local node = self.npcHandler.keywordHandler:addKeyword(keywords, TravelModule.travel, parameters) self.npcHandler.keywordHandler:addKeyword(keywords2, TravelModule.bringMeTo, parameters) node:addChildKeywordNode(self.yesNode) node:addChildKeywordNode(self.noNode) end function TravelModule.travel(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local npcHandler = module.npcHandler local cost = parameters.cost local destination = parameters.destination local premium = parameters.premium module.npcHandler:say('Do you want to travel to ' .. keywords[1] .. ' for ' .. cost .. ' gold coins?', cid) return true end function TravelModule.onConfirm(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local npcHandler = module.npcHandler local parentParameters = node:getParent():getParameters() local cost = parentParameters.cost local destination = parentParameters.destination local premium = parentParameters.premium if(isPlayerPremiumCallback(cid) or parameters.premium ~= true) then if(not doPlayerRemoveMoney(cid, cost)) then npcHandler:say('You do not have enough money!', cid) elseif(isPlayerPzLocked(cid)) then npcHandler:say('Get out of there with this blood.', cid) else npcHandler:say('It was a pleasure doing business with you.', cid) npcHandler:releaseFocus(cid) doTeleportThing(cid, destination, 0) doSendMagicEffect(destination, 10) end else npcHandler:say('I can only allow premium players to travel there.', cid) end npcHandler:resetNpc() return true end -- onDecline keyword callback function. Generally called when the player sais 'no' after wanting to buy an item. function TravelModule.onDecline(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local parentParameters = node:getParent():getParameters() local parseInfo = { [TAG_PLAYERNAME] = getCreatureName(cid), } local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_DECLINE), parseInfo) module.npcHandler:say(msg, cid) module.npcHandler:resetNpc() return true end function TravelModule.bringMeTo(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local cost = parameters.cost local destination = parameters.destination local premium = parameters.premium if(isPlayerPremiumCallback(cid) or parameters.premium ~= true) then if(doPlayerRemoveMoney(cid, cost)) then doTeleportThing(cid, destination, 0) doSendMagicEffect(destination, 10) end end return true end function TravelModule.listDestinations(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local msg = 'I can bring you to ' --local i = 1 local maxn = table.maxn(module.destinations) for i, destination in pairs(module.destinations) do msg = msg .. "{" .. destination .. "}" if(i == maxn -1) then msg = msg .. ' and ' elseif(i == maxn) then msg = msg .. '.' else msg = msg .. ', ' end i = i + 1 end module.npcHandler:say(msg, cid) module.npcHandler:resetNpc() return true end ShopModule = { npcHandler = nil, yesNode = nil, noNode = nil, noText = '', maxCount = 100, amount = 0 } -- Add it to the parseable module list. Modules.parseableModules['module_shop'] = ShopModule -- Creates a new instance of ShopModule function ShopModule:new() local obj = {} setmetatable(obj, self) self.__index = self return obj end -- Parses all known parameters. function ShopModule:parseParameters() local ret = NpcSystem.getParameter('shop_buyable') if(ret ~= nil) then self:parseBuyable(ret) end local ret = NpcSystem.getParameter('shop_sellable') if(ret ~= nil) then self:parseSellable(ret) end local ret = NpcSystem.getParameter('shop_buyable_containers') if(ret ~= nil) then self:parseBuyableContainers(ret) end end -- Parse a string contaning a set of buyable items. function ShopModule:parseBuyable(data) for item in string.gmatch(data, '[^;]+') do local i = 1 local name = nil local itemid = nil local cost = nil local subType = nil local realName = nil for temp in string.gmatch(item, '[^,]+') do if(i == 1) then name = temp elseif(i == 2) then itemid = tonumber(temp) elseif(i == 3) then cost = tonumber(temp) elseif(i == 4) then subType = tonumber(temp) elseif(i == 5) then realName = temp else print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item) end i = i + 1 end if(SHOPMODULE_MODE == SHOPMODULE_MODE_TRADE) then if(itemid ~= nil and cost ~= nil) then if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item) else self:addBuyableItem(nil, itemid, cost, subType, realName) end else print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', itemid, cost) end else if(name ~= nil and itemid ~= nil and cost ~= nil) then if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item) else local names = {} table.insert(names, name) self:addBuyableItem(names, itemid, cost, subType, realName) end else print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost) end end end end -- Parse a string contaning a set of sellable items. function ShopModule:parseSellable(data) for item in string.gmatch(data, '[^;]+') do local i = 1 local name = nil local itemid = nil local cost = nil local realName = nil for temp in string.gmatch(item, '[^,]+') do if(i == 1) then name = temp elseif(i == 2) then itemid = tonumber(temp) elseif(i == 3) then cost = tonumber(temp) elseif(i == 4) then realName = temp else print('[Warning] NpcSystem:', 'Unknown parameter found in sellable items parameter.', temp, item) end i = i + 1 end if(SHOPMODULE_MODE == SHOPMODULE_MODE_TRADE) then if(itemid ~= nil and cost ~= nil) then self:addSellableItem(nil, itemid, cost, realName) else print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', itemid, cost) end else if(name ~= nil and itemid ~= nil and cost ~= nil) then local names = {} table.insert(names, name) self:addSellableItem(names, itemid, cost, realName) else --- print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, itemid, cost) end end end end -- Parse a string contaning a set of buyable items. function ShopModule:parseBuyableContainers(data) for item in string.gmatch(data, '[^;]+') do local i = 1 local name = nil local container = nil local itemid = nil local cost = nil local subType = nil local realName = nil for temp in string.gmatch(item, '[^,]+') do if(i == 1) then name = temp elseif(i == 2) then itemid = tonumber(temp) elseif(i == 3) then itemid = tonumber(temp) elseif(i == 4) then cost = tonumber(temp) elseif(i == 5) then subType = tonumber(temp) elseif(i == 6) then realName = temp else print('[Warning] NpcSystem:', 'Unknown parameter found in buyable items parameter.', temp, item) end i = i + 1 end if(name ~= nil and container ~= nil and itemid ~= nil and cost ~= nil) then if((isItemRune(itemid) or isItemFluidContainer(itemid)) and subType == nil) then print('[Warning] NpcSystem:', 'SubType missing for parameter item:', item) else local names = {} table.insert(names, name) self:addBuyableItemContainer(names, container, itemid, cost, subType, realName) end else print('[Warning] NpcSystem:', 'Parameter(s) missing for item:', name, container, itemid, cost) end end end -- Initializes the module and associates handler to it. function ShopModule:init(handler) self.npcHandler = handler self.yesNode = KeywordNode:new(SHOP_YESWORD, ShopModule.onConfirm, {module = self}) self.noNode = KeywordNode:new(SHOP_NOWORD, ShopModule.onDecline, {module = self}) self.noText = handler:getMessage(MESSAGE_DECLINE) if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then for i, word in pairs(SHOP_TRADEREQUEST) do local obj = {} table.insert(obj, word) obj.callback = SHOP_TRADEREQUEST.callback or ShopModule.messageMatcher handler.keywordHandler:addKeyword(obj, ShopModule.requestTrade, {module = self}) end end return true end -- Custom message matching callback function for requesting trade messages. function ShopModule.messageMatcher(keywords, message) for i, word in pairs(keywords) do if(type(word) == 'string') then if string.find(message, word) and not string.find(message, '[%w+]' .. word) and not string.find(message, word .. '[%w+]') then return true end end end return false end -- Resets the module-specific variables. function ShopModule:reset() self.amount = 0 end -- Function used to match a number value from a string. function ShopModule:getCount(message) local ret = 1 local b, e = string.find(message, PATTERN_COUNT) if b ~= nil and e ~= nil then ret = tonumber(string.sub(message, b, e)) end if(ret <= 0) then ret = 1 elseif(ret > self.maxCount) then ret = self.maxCount end return ret end -- Adds a new buyable item. -- names = A table containing one or more strings of alternative names to this item. Used only for old buy/sell system. -- itemid = The itemid of the buyable item -- cost = The price of one single item -- subType - The subType of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer. Default value is 1. -- realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used) function ShopModule:addBuyableItem(names, itemid, cost, subType, realName) if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then if(self.npcHandler.shopItems[itemid] == nil) then self.npcHandler.shopItems[itemid] = {buyPrice = -1, sellPrice = -1, subType = 1, realName = ""} end self.npcHandler.shopItems[itemid].buyPrice = cost self.npcHandler.shopItems[itemid].realName = realName or getItemNameById(itemid) self.npcHandler.shopItems[itemid].subType = subType or 1 end if(names ~= nil and SHOPMODULE_MODE ~= SHOPMODULE_MODE_TRADE) then for i, name in pairs(names) do local parameters = { itemid = itemid, cost = cost, eventType = SHOPMODULE_BUY_ITEM, module = self, realName = realName or getItemNameById(itemid), subType = subType or 1 } keywords = {} table.insert(keywords, 'buy') table.insert(keywords, name) local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters) node:addChildKeywordNode(self.yesNode) node:addChildKeywordNode(self.noNode) end end end -- Adds a new buyable container of items. -- names = A table containing one or more strings of alternative names to this item. -- container = Backpack, bag or any other itemid of container where bought items will be stored -- itemid = The itemid of the buyable item -- cost = The price of one single item -- subType - The subType of each rune or fluidcontainer item. Can be left out if it is not a rune/fluidcontainer. Default value is 1. -- realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used) function ShopModule:addBuyableItemContainer(names, container, itemid, cost, subType, realName) if(names ~= nil) then for i, name in pairs(names) do local parameters = { container = container, itemid = itemid, cost = cost, eventType = SHOPMODULE_BUY_ITEM_CONTAINER, module = self, realName = realName or getItemNameById(itemid), subType = subType or 1 } keywords = {} table.insert(keywords, 'buy') table.insert(keywords, name) local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters) node:addChildKeywordNode(self.yesNode) node:addChildKeywordNode(self.noNode) end end end -- Adds a new sellable item. -- names = A table containing one or more strings of alternative names to this item. Used only by old buy/sell system. -- itemid = The itemid of the sellable item -- cost = The price of one single item -- realName - The real, full name for the item. Will be used as ITEMNAME in MESSAGE_ONBUY and MESSAGE_ONSELL if defined. Default value is nil (getItemNameById will be used) function ShopModule:addSellableItem(names, itemid, cost, realName) if(SHOPMODULE_MODE ~= SHOPMODULE_MODE_TALK) then if(self.npcHandler.shopItems[itemid] == nil) then self.npcHandler.shopItems[itemid] = {buyPrice = -1, sellPrice = -1, subType = 1, realName = ""} end self.npcHandler.shopItems[itemid].sellPrice = cost self.npcHandler.shopItems[itemid].realName = realName or getItemNameById(itemid) end if(names ~= nil and SHOPMODULE_MODE ~= SHOPMODULE_MODE_TRADE) then for i, name in pairs(names) do local parameters = { itemid = itemid, cost = cost, eventType = SHOPMODULE_SELL_ITEM, module = self, realName = realName or getItemNameById(itemid) } keywords = {} table.insert(keywords, 'sell') table.insert(keywords, name) local node = self.npcHandler.keywordHandler:addKeyword(keywords, ShopModule.tradeItem, parameters) node:addChildKeywordNode(self.yesNode) node:addChildKeywordNode(self.noNode) end end end -- onModuleReset callback function. Calls ShopModule:reset() function ShopModule:callbackOnModuleReset() self:reset() return true end -- Callback onBuy() function. If you wish, you can change certain Npc to use your onBuy(). function ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onBuy]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].buyPrice == -1) then error("[ShopModule.onSell]", "Attempt to buy a non-buyable item") return false end local backpack = 1988 local totalCost = amount * self.npcHandler.shopItems[itemid].buyPrice if(inBackpacks) then totalCost = totalCost + (math.max(1, math.floor(amount / getContainerCapById(backpack))) * 20) end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = totalCost, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(getPlayerMoney(cid) < totalCost) then local msg = self.npcHandler:getMessage(MESSAGE_NEEDMONEY) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) return false end local subType = self.npcHandler.shopItems[itemid].subType or 1 local a, b = doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack) if(a < amount) then local msgId = MESSAGE_NEEDMORESPACE if(a == 0) then msgId = MESSAGE_NEEDSPACE end local msg = self.npcHandler:getMessage(msgId) parseInfo[TAG_ITEMCOUNT] = a msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end if(a > 0) then doPlayerRemoveMoney(cid, ((a * self.npcHandler.shopItems[itemid].buyPrice) + (b * 20))) return true end return false else local msg = self.npcHandler:getMessage(MESSAGE_BOUGHT) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerRemoveMoney(cid, totalCost) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true end end -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) if(self.npcHandler.shopItems[itemid] == nil) then error("[ShopModule.onSell]", "items[itemid] == nil") return false end if(self.npcHandler.shopItems[itemid].sellPrice == -1) then error("[ShopModule.onSell]", "Attempt to sell a non-sellable item") return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * self.npcHandler.shopItems[itemid].sellPrice, [TAG_ITEMNAME] = self.npcHandler.shopItems[itemid].realName } if(subType < 1) then subType = -1 end if(doPlayerRemoveItem(cid, itemid, amount, subType)) then local msg = self.npcHandler:getMessage(MESSAGE_SOLD) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg) doPlayerAddMoney(cid, amount * self.npcHandler.shopItems[itemid].sellPrice) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true else local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) msg = self.npcHandler:parseMessage(msg, parseInfo) doPlayerSendCancel(cid, msg) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end end -- Callback for requesting a trade window with the NPC. function ShopModule.requestTrade(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local itemWindow = {} for itemid, attr in pairs(module.npcHandler.shopItems) do local item = {id = itemid, buy = attr.buyPrice, sell = attr.sellPrice, subType = attr.subType, name = attr.realName} table.insert(itemWindow, item) end if(itemWindow[1] == nil) then local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) } local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_NOSHOP), parseInfo) module.npcHandler:say(msg, cid) return true end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid) } local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_SENDTRADE), parseInfo) openShopWindow(cid, itemWindow, function(cid, itemid, subType, amount, ignoreCap, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) end, function(cid, itemid, subType, amount, ignoreCap, inBackpacks) module.npcHandler:onSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) end) module.npcHandler:say(msg, cid) return true end -- onConfirm keyword callback function. Sells/buys the actual item. function ShopModule.onConfirm(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local parentParameters = node:getParent():getParameters() local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = module.amount, [TAG_TOTALCOST] = parentParameters.cost * module.amount, [TAG_ITEMNAME] = parentParameters.realName } if(parentParameters.eventType == SHOPMODULE_SELL_ITEM) then local ret = doPlayerSellItem(cid, parentParameters.itemid, module.amount, parentParameters.cost * module.amount) if(ret) then local msg = module.npcHandler:getMessage(MESSAGE_ONSELL) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) else local msg = module.npcHandler:getMessage(MESSAGE_MISSINGITEM) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) end elseif(parentParameters.eventType == SHOPMODULE_BUY_ITEM) then local ret = doPlayerBuyItem(cid, parentParameters.itemid, module.amount, parentParameters.cost * module.amount, parentParameters.subType) if(ret) then if parentParameters.itemid == ITEM_PARCEL then doPlayerBuyItem(cid, ITEM_LABEL, module.amount, 0, parentParameters.subType) end local msg = module.npcHandler:getMessage(MESSAGE_ONBUY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) else local msg = module.npcHandler:getMessage(MESSAGE_MISSINGMONEY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) end elseif(parentParameters.eventType == SHOPMODULE_BUY_ITEM_CONTAINER) then local ret = doPlayerBuyItemContainer(cid, parentParameters.container, parentParameters.itemid, module.amount, parentParameters.cost * module.amount, parentParameters.subType) if(ret) then local msg = module.npcHandler:getMessage(MESSAGE_ONBUY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) else local msg = module.npcHandler:getMessage(MESSAGE_MISSINGMONEY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) end end module.npcHandler:resetNpc() return true end -- onDecliune keyword callback function. Generally called when the player sais 'no' after wanting to buy an item. function ShopModule.onDecline(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local parentParameters = node:getParent():getParameters() local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = module.amount, [TAG_TOTALCOST] = parentParameters.cost * module.amount, [TAG_ITEMNAME] = parentParameters.realName } local msg = module.npcHandler:parseMessage(module.noText, parseInfo) module.npcHandler:say(msg, cid) module.npcHandler:resetNpc() return true end -- tradeItem callback function. Makes the npc say the message defined by MESSAGE_BUY or MESSAGE_SELL function ShopModule.tradeItem(cid, message, keywords, parameters, node) local module = parameters.module if(not module.npcHandler:isFocused(cid)) then return false end local count = module:getCount(message) module.amount = count local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = module.amount, [TAG_TOTALCOST] = parameters.cost * module.amount, [TAG_ITEMNAME] = parameters.realName } if(parameters.eventType == SHOPMODULE_SELL_ITEM) then local msg = module.npcHandler:getMessage(MESSAGE_SELL) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) elseif(parameters.eventType == SHOPMODULE_BUY_ITEM) then local msg = module.npcHandler:getMessage(MESSAGE_BUY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) elseif(parameters.eventType == SHOPMODULE_BUY_ITEM_CONTAINER) then local msg = module.npcHandler:getMessage(MESSAGE_BUY) msg = module.npcHandler:parseMessage(msg, parseInfo) module.npcHandler:say(msg, cid) end return true end end MESMO ASSIM DEVO TROCAR ?
  22. então meu querido, eu preciso do npc que venda a promotion por item ou que promova o player como a queen eloise de carlin, porém esta promoção vai ser adquirida por gold nuggets ao invez de gold coins! aki estão as promotions! <vocation id="9" name="Soul Sorcerer" description="a soul sorcerer" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Shamanic Druid" description="a shamanic druid" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Bright Paladin" description="a bright paladin" needpremium="1" gaincap="22" gainhp="11" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.4" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Blade Knight" description="a blade knight" needpremium="1" gaincap="47" gainhp="25" gainmana="6" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="25" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="13" name="Soul Master Sorcerer" description="a soul master sorcerer" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="9" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="14" name="Shamanic Elder Druid" description="a shamanic elder druid" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="10" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="15" name="Bright Royal Paladin" description="a bright royal paladin" needpremium="1" gaincap="24" gainhp="12" gainmana="25" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.4" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="16" name="Blade Elite Knight" description="a blade elite knight" needpremium="1" gaincap="49" gainhp="35" gainmana="7" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="35" manamultiplier="3.0" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="17" name="Infernatil Soul Sorcerer" description="an infernatil soul sorcerer" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="13" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="18" name="Ancient Shamanic Druid" description="an ancient shamanic druid" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="14" lessloss="70"><formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="19" name="Divine Bright Paladin" description="a divine bright paladin" needpremium="1" gaincap="23" gainhp="13" gainmana="30" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="45" manamultiplier="1.4" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="20" name="Gladiator Blade Knight" description="a gladiator blade knight" needpremium="1" gaincap="51" gainhp="45" gainmana="9" gainhpticks="8" gainhpamount="20" gainmanaticks="4" gainmanaamount="45" manamultiplier="3.0" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="16" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation>
  23. Foi mal vod! é pq esse script mexe com npc, action no item ou outra coisa, que eu nao tenho certeza intende? por isso coloquei aki, desculpe se foi na seção errada , vc poderia me dar uma ajuda nisso ai ?
  24. Boa noite! bom, procurei por isto em varios lugares e nao achei em nenhum :/ por favor, se a seção estiver errada, movam para a certa , pois não sei se este sistema é realmente uma action ou pode ser outra coisa... mas é o seguinte. vou explicar tudo detalhadamente para não ter erro... no meu ot, existem varias promoções. o sistema vip está funcionando corretamente, e ele é um sistema por item. o player compra o item no shopping , que no meu caso é um Holy falcon, editado com o nome de VIP 30 Dias, da use nele e então recebe em sua conta 30 dias de VIP. Fiz um npc que só fala com players vips, e ele leva estes players para uma área vip. Nesta área VIP eu preciso de um NPC que venda a nova Promotion para o player (que no caso é um item único configurável ) por alguns GOLD NUGGETS ao invez de GOLD COINS, (por exemplo um nightmare doll, id:11138) ou somente por dinheiro, mas no caso, para comprar esta promotion ele teria que ter uma moeda especial , ( no caso é uma gold nugget , editada. ID:2157) ou seja, o npc venderia a promotion para o player vip somente por uma quantidade de gold nuggets. Porém, existe mais de uma promotion por vocation, este é meu Vocations.XML <?xml version="1.0" encoding="UTF-8"?> <vocations> <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="5" manamultiplier="1.4" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="3"> <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="10" gainmanaticks="2" gainmanaamount="5" manamultiplier="3.0" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="2" gainhpamount="5" gainmanaticks="2" gainmanaamount="15" manamultiplier="1.1" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="15" manamultiplier="1.4" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.3" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="35" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="20" gainmanaticks="1" gainmanaamount="15" manamultiplier="3.0" attackspeed="1500" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="9" name="Soul Sorcerer" description="a soul sorcerer" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Shamanic Druid" description="a shamanic druid" needpremium="1" gaincap="11" gainhp="6" gainmana="35" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.1" attackspeed="2000" soulmax="250" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Bright Paladin" description="a bright paladin" needpremium="1" gaincap="22" gainhp="11" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="25" manamultiplier="1.4" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Blade Knight" description="a blade knight" needpremium="1" gaincap="47" gainhp="25" gainmana="6" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="25" manamultiplier="3.0" attackspeed="1300" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="13" name="Soul Master Sorcerer" description="a soul master sorcerer" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="9" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="14" name="Shamanic Elder Druid" description="a shamanic elder druid" needpremium="1" gaincap="12" gainhp="7" gainmana="40" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="2000" soulmax="300" gainsoulticks="15" fromvoc="10" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="15" name="Bright Royal Paladin" description="a bright royal paladin" needpremium="1" gaincap="24" gainhp="12" gainmana="25" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="35" manamultiplier="1.4" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="16" name="Blade Elite Knight" description="a blade elite knight" needpremium="1" gaincap="49" gainhp="35" gainmana="7" gainhpticks="1" gainhpamount="20" gainmanaticks="4" gainmanaamount="35" manamultiplier="3.0" attackspeed="1100" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="60"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="17" name="Infernatil Soul Sorcerer" description="an infernatil soul sorcerer" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="13" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="18" name="Ancient Shamanic Druid" description="an ancient shamanic druid" needpremium="1" gaincap="13" gainhp="8" gainmana="45" gainhpticks="4" gainhpamount="5" gainmanaticks="2" gainmanaamount="45" manamultiplier="1.1" attackspeed="2000" soulmax="350" gainsoulticks="15" fromvoc="14" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="19" name="Divine Bright Paladin" description="a divine bright paladin" needpremium="1" gaincap="23" gainhp="13" gainmana="30" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="45" manamultiplier="1.4" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="20" name="Gladiator Blade Knight" description="a gladiator blade knight" needpremium="1" gaincap="51" gainhp="45" gainmana="9" gainhpticks="8" gainhpamount="20" gainmanaticks="4" gainmanaamount="45" manamultiplier="3.0" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="16" lessloss="70"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> --> </vocations>[/b] [b] Então resumindo. Preciso de um NPC que: Venda a promotion para o player por GOLD NUGGETS ao invez de GOLD COINS, e que venda estas promotions tanto por um ITEM USAVEL, ou simplesmente como o npc queen eloise, que vende a promotion por 20k, porem ao invez de 20k, seriam alguns GOLD NUGGETS ! Desde já agradeço muito ! por favor, preciso urgente deste script, só falta isto para meu ot ficar pronto. Dou todos meus Reps++ OBRIGADO !!

Informação Importante

Confirmação de Termo