Ir para conteúdo

RigBy

Visconde
  • Total de itens

    411
  • Registro em

  • Última visita

  • Dias Ganhos

    10

Tudo que RigBy postou

  1. E porque a maiorias dos jogos de RPG o que me chama mas a atenção são as spells. Fiz me baseando na vocação necromancer de AQW kkkkkk.
  2. Isso deve ser porque você ta usando a mesma storage em todos os baus.Cada quest deve ter uma storage diferente senão buga. Dei uma editada pra te ajuda. local storage = 20001 -- sempre que criar uma quest nova modifique aqui, nunca repita local itemid = 7451 -- item que vai ganha local quantidade = 1 -- quantidade function onUse(cid, item, frompos, item2, topos)if item.uid == 20611 then queststatus = getPlayerStorageValue(cid,storage) if queststatus == -1 then doPlayerPopupFYI(cid, "Você ganhou um item DONATE!") doPlayerAddItem(cid, itemid, quantidade) setPlayerStorageValue(cid,storage,1) else doPlayerPopupFYI(cid, "Você já pegou um item DONATE!") end else return 0 end return 1 end
  3. @Mers Tutorial Sim e uma spells, tem o creaturescript e a spell que serve pra ativar o creaturescript. @killua Hehehe, eu ate já tenho uma ideia só que eu to viajando e onde eu to a net cai tipo em 2 e 2 minutos e demora pra volta isso atrapalha muito pra eu pesquisar. Vo começar a botar em pratica minha ideia quando eu volta
  4. Vlw eu vo tentar ter mais ideia boa pra pode participa do oms.
  5. Caraca foi mesmo tinha esquecido desse, eu vo usa onLogin, vlw ai @edit :Pronto ja editei o topico.
  6. Unknown Heal Introdução Eu tava criando essa script pra participa da oms, mais não deu tempo de coloca então ta aqui. Coloquei o nome de unknown heal porque eu não conseguir pensa em um nome pra ela. ¬¬ O que a script faz : -Se algum monstro ou player tiver te atacando o dano se transforma em curar. por exemplo se você toma um dano de 100 quando a magia tiver ativa esse dano de 100 vai se transforma em life pode ser configurado. Vamos la. xD creaturescript: unknownheal.lua: -- Do not remove the credits -- -- [CREATURESCRIPT] Unknown Heal -- -- developed by Rigby -- -- Especially for the Xtibia.com -- function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then local vida = (value) -- não mecha nisso local retira = 1 -- 1 vai absorve o life todo , 2 vai obsorve metade do life if (getPlayerStorageValue(cid, 54654644) == 1) then doCreatureAddHealth(cid, (vida / retira)) doSendAnimatedText(getCreaturePosition(cid), "+"..(vida / retira).."!", 25) return false end end return true end function onLogin(cid) doPlayerSetStorageValue(cid, 54654644, -1) return true end creaturescript.xml tag: <event type="Login" name="unknownheal" event="script" value="unknownheal.lua"/> <event type="StatsChange" name="unknownheal2" event="script" value="unknownheal.lua"/> Login.lua adicione isso antes do ultimo return registerCreatureEvent(cid, "unknownheal") em spells/script unknownheal.lua: -- Do not remove the credits -- -- [SPELL] Unknown Heal -- -- developed by Rigby -- -- Especially for the Xtibia.com -- local tempo = 5 -- quanto tempo a magia vai durar local timer = 5 -- quantos segundos em segundo vai pode usa a magia -- obs:so vai começa a conta quando a magia tiver terminado local effect = 28 -- efeito da magia local storage = 1231234343 local storagemag = 54654644 -- não mecha function onCastSpell(cid, var) if getPlayerStorageValue(cid, storagemag) == -1 then if getPlayerStorageValue(cid, storage) < os.time () then setPlayerStorageValue(cid, storagemag, 1) doSendMagicEffect(getThingPos(cid), 28) setPlayerStorageValue(cid, storage, os.time () + tempo + timer) addEvent(termina, tempo*1000, cid) else doPlayerSendCancel(cid, "Voce so pode usar esse magia daqui a "..getPlayerStorageValue(cid, storage) - os.time ().." segundos.") end else doPlayerSendCancel(cid, "Voce ja ta usando a magia.") end return true end function termina(cid) setPlayerStorageValue(cid, storagemag, -1) doSendMagicEffect(getThingPos(cid), 29) end end Spells.xml tag: <instant name="Unknownheal" words="unknown heal" lvl="1" mana="0" prem="0" range="10" blockwalls="0" exhaustion="0" needlearn="0" event="script" value="unknownheal.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="0"/> </instant> Bug Ageitado funcionando 100%
  7. RigBy

    Math.random Posição

    Eu uso essa script no meu ot acredito que você tem conhecimento sobre script então ta aqui. positions = { {x = 93, y = 114, z = 7}, {x = 98, y = 114, z = 7} } function onJoinChannel(cid, channel, users) if getPlayerVocation(cid) == 2 then if channel == 19 then doTeleportThing(cid,positions[math.random(#positions)]) doSendMagicEffect(getThingPos(cid), "Enter!", 4) doSendAnimatedText(getThingPos(cid), "EnterGame!", 200) doPlayerSetVocation(cid, 0) end end return true end
  8. Reverts Tava jogando um jogo de RPG quando vi uma magia que transformar o life em focus (mana) e so pode usa durante um tempo. essa magia pega metade de seu life e transforma em mana. Tem que usa com sabedoria xD Obs: procurei algo parecido com o meu mas não achei então esse e totalmente próprio. vamos la.xD Em data/spells/script/support copie e cole algum arquivo.lua e renomear para Reverts.lua e adiciona isso dentro -- Do not remove the credits -- -- [SPELL] Reverts -- -- Developed by Rigby- - -- Especially for the Xtibia.com -- local timer = 20 -- quantos segundos em segundo vai pode usa a magia local divisao = 2 -- quanto de life vai retirar, 2 metade, 3 um terço. local effect = 30 -- efeito da magia local storage = 10001 -- storage não precisar mecher function onCastSpell(cid, var) if getPlayerStorageValue(cid, storage) < os.time () then doSendMagicEffect(getThingPos(cid), effect) doCreatureAddMana(cid, (getCreatureHealth(cid) / divisao)) doSendAnimatedText(getThingPos(cid), "+"..(getCreatureHealth(cid) / divisao).."", 35) doCreatureAddHealth(cid, -(getCreatureHealth(cid) / divisao)) setPlayerStorageValue(cid, storage, os.time () + timer) else doPlayerSendCancel(cid, "Voce so pode usar esse magia daqui a "..getPlayerStorageValue(cid, storage) - os.time ().." segundos.") end return true end em data/spells/spells.xml adicione essa tag. <instant name="Reverts" words="reverts" lvl="1" mana="0" aggressive="0" selftarget="1" exhaustion="1" needlearn="0" event="script" value="support/Reverts.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="3"/> <vocation id="4"/> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> </instant> Espero que goste da magia. Podem da opiniões quem sabe sai a versão 2. xD
  9. Viajando, net caindo toda hora.¬¬
  10. RigBy

    Npc

    Npc.lua 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 pos = {x= 1, y= 2, z= 3} -- posição pra onde sera teleportado local itemid = {2382, 12252, 12253, 12254, 12255, 12256, 12257, 12258, 2160} --items que precisa pra pode passa if(msgcontains(msg, 'yes') then if getPlayerStorageValue(cid, 21321312312) == 1 doTeleportThing(cid, pos) selfSay('Voce foi teleportado.', cid) elseif getPlayerItemCount(cid, itemid) >= 1 then doPlayerSetStorageValue(cid, 21321312312, 1) doTeleportThing(cid, pos) selfSay('Voce foi teleportado.', cid) else selfSay('Voce nao tem os items nessessarios.', cid) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Npc.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome do npc" script="Nome do Script.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Oi |PLAYERNAME|, Voce que ser teleportado diga {yes}."/> </parameters> </npc> testa ai qualquer erro fala que eu resolvo.
  11. vocês fez o pedido no local errado, deveria ser em pedido e duvidas - scripting ----------------------- quanto ao pedido em movements crie um arquivo.lua e adicione isso dentro local positions = { {x = 101, y = 117, z = 4}, -- aqui vc coloca a posição pra onde ele vão {x = 101, y = 117, z = 4}, {x = 101, y = 117, z = 4}, {x = 101, y = 117, z = 4}, {x = 101, y = 117, z = 4} } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) doTeleportThing(cid, positions[math.random(1, #positions)]) return true end em movement.xml adicione essa tag <movevent type="StepIn" actionid="31234" event="script" value="Nome do script.lua"/> adicione o actionid pelo rme no tile que o player aparece quando nasce
  12. Testado e funcionado no movement adicione isso function onStepIn(cid, item, position, fromPosition) local itemid = {2382, 12252, 12253, 12254, 12255, 12256, 12257, 12258, 2160} --items que precisa pra pode passa local pos = {x= 101, y= 117, z= 4} -- posição pra onde sera teleportado if getPlayerItemCount(cid, itemid) >= 1 then doPlayerSendCancel(cid, "Agora voce pode duela com o elite dos 4.") doTeleportThing(cid, pos) else doPlayerSendCancel(cid, "Voce nao tem as insignias.") doTeleportThing(cid, fromPosition) end return true end tag <movevent type="StepIn" actionid="31234" event="script" value="nome do script.lua"/> so basta adicionar o actionid no chão pelo rme bye, vo ir joga bola voltei simplifiquei mais a script
  13. Eu fiz so que teve um problema, não vai adiciona skill. caso vc ja tenha jogado ot de war você vio que quando vai loga costuma da sempre uma travado pois ta adicionando os skill. então se eu adiciona-se nessa script ia trava o char sempre que clika-se no item ,eu sabia um jeito de adiciona sem trava só que o boneco ia ter que desloga sempre. e tambem eu não conseguir fazer com que remove-se a skill. então fiz so pra adicionar hp,mp,troca de outfit e aumenta a velocidade, espero que sirva. Testado(superficialmente) e funcionando. function returnTransform(cid) local hp = 300 -- quantidade de hp que vai perde local mp = 300 -- quantidade de mp que vai perde if isCreature(cid) then setCreatureMaxHealth(cid, - hp) setCreatureMaxMana(cid, - mp) doChangeSpeed(cid, (getCreatureSpeed(cid)) - 400) doPlayerSetStorageValue(cid, 123123122, -1) doPlayerSendCancel(cid, "Voce volto ao normal.") end return true end function onUse(cid, item, fromPosition, itemEx, toPosition) local level = 0 -- level pra pode usa local outfit = 130 -- outfit que vai virar local timer = 1 -- quantos minutos vai demora pra perde a skill local effect = 1 -- efeito que vai sai local hp = 300 -- quantidade de hp que vai ganha local mp = 300 -- quantidade de mp que vai ganha if getPlayerLevel(cid) >= level then if getPlayerStorageValue(cid, 123123122) < 0 then doSendMagicEffect(getCreaturePosition(cid), effect) doCreatureSay(cid, "Ohhhhw", TALKTYPE_ORANGE_1) doSetCreatureOutfit(cid,{lookType = 52, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},timer * 60 * 1000) doPlayerSetStorageValue(cid, 123123122, 1) setCreatureMaxHealth(cid, (getCreatureHealth(cid)) + hp) setCreatureMaxMana(cid, (getCreatureMana(cid)) + mp) doCreatureAddMana(cid, mp) doCreatureAddHealth(cid, hp) doChangeSpeed(cid, (getCreatureSpeed(cid)) + 400) addEvent(returnTransform, timer*1000*60, cid) else doPlayerSendCancel(cid, "Você ja ta transformado.") end else doPlayerSendCancel(cid, "Voce não tem level nessessario.") end return true end
  14. Sim, eu vo viajar e quando eu volta eu vo explica como usa cada callback. Talvez eu edite aqui explicando como usa cada.
  15. RigBy

    Piso Remover

    local monster = {x = 1, y = 2, z = 3} -- posição que o trainer vai aparecer local name = "trainer" -- NOME DO MONSTRO QUE SERA SUMONADO DEVE SEMPRE ESTAR ENTRE ASPAS Exemplo: "dragon" "frost dragon" function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then doPlayerSendCancel(cid, "Bem vindo ao trainer.") doSummonCreature(name, monster) end return true end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) doPlayerSendCancel(cid, "Tchau.") doRemoveCreature(getTopCreature(monster).uid) return true end testa ai so basta criar outra tag com stepout com o mesmo actionid tags <movevent type="StepIn" actionid="57573" event="script" value="as.lua"/> <movevent type="StepOut" actionid="57573" event="script" value="as.lua"/>
  16. Se você adiciona ele como promotion, ela não vai aparecer. tipo: fromvoc="9" -- so basta editar colocando aqui o id da vocação que voce vai querer que seja promovida tipo druid id 2 ai vc coloca fromvoc="2" e cria uma script de promote ou adiciona com o god hehehe. flw
  17. Callbacks Você já deve ter se perguntado como os scripts funcionam ou não. Por exemplo: Como o servidor sabe que quando eu apertar com o botão direito em um Health Potion ele terá que healar o player alvo? Em primeiro lugar devemos entender o que são callbacks. Do modo mais simples callback é algo que acontece devido a uma reação, é como a Terceira Lei de Newton que diz que toda ação gera uma reação, esse callback é a nossa reção, é uma função que vai ser executada assim que algo acontecer, no caso do Health Potion assim que ele for usado. Credito: Maxwellden ACTIONS onUse(cid, item, fromPosition, itemEx, toPosition) CREATURE SCRIPTS onLogin(cid) onLogout(cid) onAdvance(cid, skill, oldLevel, newLevel) onStatsChange(cid, attacker, type, combat, value) onDirection(cid, old, current) onOutfit(cid, old, current) onSendMail(cid, receiver, item, openBox) onReceiveMail(cid, sender, item, openBox) onTradeRequest(cid, target, item) onTradeAccept(cid, target, item, targetItem) onJoinChannel(cid, channel, users) onLeaveChannel (cid, channel, users) onLook(cid, thing, position, lookDistance) onThink(cid, interval) onTextEdit(cid, item, newText) onReportBug(cid, comment) onAreaCombat(cid, tileItem, tilePosition, isAggressive) onPush(cid, target) onTarget(cid, target) onFollow(cid, target) onCombat(cid, target) onAttack(cid, target) onCast(cid, target) onKill(cid, target, lastHit) onDeath(cid, corpse, deathList) onPrepareDeath(cid, deathList) GLOBAL EVENTS onThink(interval) onStartup() onShutdown() onGlobalSave() onRecord(current, old, cid) onTime() MOVEMENTS onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) onEquip(cid, item, slot) onDeEquip(cid, item, slot) onAddItem(moveItem, tileItem, position, cid) onRemoveItem(moveItem, tileItem, position, cid) SPELLS onCastSpell(cid, var) TALKACTIONS onSay(cid, words, param, channel) WEAPONS onUseWeapon(cid, var) Retirado do SCRIPTSYSTEM_HELP, doc das Sources do TFS. ​Créditos: Renato RigBy
  18. RigBy

    System akatsuki

    @likinho: acho que isso não tem nada a ver com o pedido que o cara fez ,esse script e so um changer vocation feito pelo 20cm. @topico: Caso ainda não tenha resolvindo fala ai que não, que quando eu chega em casa eu tento fazer sua script falo. @script npc <?xml version="1.0" encoding="UTF-8"?> <npc name="Tobi" script="data/npc/scripts/tobi npc script.lua" walkinterval="2000" speed="0" floorchange="0"> <health now="100" max="100"/> <look type="480" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Voce que troca seus coracoes para pode entra na akatsuki.reponda {yes} ?"/> </parameters> </npc> script do npc local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local vocation = 120 -- vocation que precisa ter local vocatiion = 900 -- vocation que vai se transforma local item = 5943 -- ID do Item que necessita para trocar local quantidade = 10 -- quantidade de corações local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'sim')) then if getPlayerStorageValue(cid, 8219382) == -1 then if getPlayerVocation(cid) == vocation then if getPlayerItemCount(cid, item) < quantidade then selfSay('Não tente me enganar, voce não tem os '..quantidade..' corações !', cid) else doPlayerRemoveItem(cid, item, quantidade) doPlayerSetVocation(cid, vocatiion) setPlayerStorageValue(cid,8219382,1) selfSay('Voce agora faz parte da akatsuki.', cid) end else selfSay('Voce nao tem a vocacao nessessaria.', cid) end else selfSay('Voce ja faz parte da akatsuki.', cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Coração Creaturescript/script/nome do script adicione isso dentro function onKill(cid, target, lastHit) local item = 5943 local level = 300 if isPlayer(cid) and isPlayer(target) then if getPlayerLevel(target) >= level then local add = doPlayerAddItem(cid, item, 1) doItemSetAttribute(add, "description","Esse coração é de "..getPlayerName(target).." que foi morto no level "..getPlayerLevel(target).." por "..getPlayerName(cid)..".") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce Mato " ..getPlayerName(target).. ".") doSendMagicEffect(getPlayerPosition(cid),12) end end return true end Tag: <event type="kill" name="HeartSys" event="script" value="heart.lua"/> Testado e funcionando
  19. RigBy

    Como faz Quest?

    cara antes de fazer pedido assim procure primeiro no google. @topic https://www.google.com.br/?gfe_rd=cr&ei=_zYBU-T0BOuB8Qfm1IGYCw#q=xtibia+fazendo+quest
  20. @djwalisson hehehehehe eu acho que ele quis dizer que caso ele vire a vocação harry potter ele ganhe uma outfit. @kazaana voce vai ter que desativar pelo config pra que ele não possa troca de outfit. não to em casa e eu fiz isso usando bloco de nota e usei tudo que eu lembrei pra pode fazer esse script. então não testei. em creaturescript copie algum arquivo.lua e cole (renomeie) e adicione isso dentro. local vocation = 3 -- vocation que vai ganha a outfit local outfit = 130 -- outfit que vai ganha function onLogin(cid) if getPlayerVocation(cid) == vocation then doCreatureChangeOutfit(cid, outfit) end return true end em creaturescript.xml adicione isso <event type="login" name="vocoutfit" event="script" value="NOME DA SCRIPT.lua"/> em creaturescript/script/login.lua adicione essa tag antes do ultimo return true adicione. registerCreatureEvent(cid, "vocoutfit") mais isso so vai funciona caso quando o player deslego e logue ai vai muda a outfit. caso voce troque de vocation por script so basta adiciona essa função no script doCreatureChangeOutfit(cid, outfit) obs: nunca usei essa função então testa ai
  21. pronto ajeitei ,eu apaguei aqueles vocation epic já que você não usa e adicionei a sua.caso você queria adicionar mais agora pega. demon fury id:9 <?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="2" 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="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" 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="12" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" 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="8" gainhpamount="1" gainmanaticks="4" gainmanaamount="2" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="3"> <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="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="4"> <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="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="12" gainhpamount="1" gainmanaticks="2" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" 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="12" gainhpamount="1" gainmanaticks="2" gainmanaamount="2" manamultiplier="1.1" attackspeed="2000" 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="6" gainhpamount="1" gainmanaticks="3" gainmanaamount="2" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="3" 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.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="25" gainhp="15" gainmana="5" gainhpticks="4" gainhpamount="1" gainmanaticks="6" gainmanaamount="2" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="4" 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.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="Demon Fury" description="a Demon Fury" needpremium="1" gaincap="30" gainhp="30" gainmana="30" gainhpticks="2" gainhpamount="700" gainmanaticks="2" gainmanaamount="700" manamultiplier="1.1" attackspeed="70" soulmax="200" gainsoulticks="30" fromvoc="9" lessloss="20"> <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.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> </vocations>
  22. \o/
    1. heavy2

      heavy2

      Ei Rigby cade o mordecai ? >_<

  23. em vocation.xml fromvoc="1" -- mude pro mesmo id da vocation
  24. RigBy

    Npc Hunt por Item

    Testa assim: 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) local pos = {x=1039, y=1072, z=7} -- Local da hunt local posreturn = {x=1039, y=1072, z=7} -- Posiçao onde o player sera teleportado quando acabar o tempo local itemid = 2160 -- item que sera removido local quantidade = 1 -- quantidade config = { time = 10 ---Tempo que ele vai ficar na hunt sabendo que cada numeral equivale a um minuto----- } function doReturnPos() doTeleportThing(cid, posreturn) setGlobalStorageValue(24688, 0) setGlobalStorageValue(24686, none) setPlayerStorageValue(cid, 28680, 0) end if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'hunt') then if getGlobalStorageValue(24688) == 1 then doPlayerSendTextMessage(cid,22,"O player "..getGlobalStorageValue(24686).." esta na hunt") return true end if not doPlayerRemoveItem(cid, itemid, quantidade) then doPlayerSendTextMessage(cid,22,""..getPlayerName(cid)..", voce precisa do "..itemid.." para usar a hunt paga") return true end doPlayerRemoveItem(cid, itemid, quantidade) doPlayerSendTextMessage(cid,22,"Obrigado "..getPlayerName(cid).." foi teleportado.") doTeleportThing(cid, pos) setGlobalStorageValue(24688, 1) setGlobalStorageValue(24686, getPlayerName(cid)) setPlayerStorageValue(cid, 28680, 1) addEvent(doReturnPos, config.time*60*1000) else selfSay('Diga Hunt', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  • Quem Está Navegando   0 membros estão online

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