-
The Oracle Especifico
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local vocation = {} local town = {} local destination = {} 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 function greetCallback(cid) local level = getPlayerLevel(cid) if level < 8 then npcHandler:say("CHILD! COME BACK WHEN YOU HAVE GROWN UP!", cid) return false elseif level > 8 then npcHandler:say(getCreatureName(cid) .. ", I CAN'T LET YOU LEAVE - YOU ARE TOO STRONG ALREADY! YOU CAN ONLY LEAVE WITH LEVEL 8 OR LOWER.", cid) return false elseif getPlayerVocation(cid) > 0 then npcHandler:say("YOU ALREADY HAVE A VOCATION!", cid) return false end return true end local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false elseif msgcontains(msg, "yes") and npcHandler.topic[cid] == 0 then npcHandler:say("Your initial destination {Kaytan Island}, you will become stronger.", cid) npcHandler.topic[cid] = 1 elseif npcHandler.topic[cid] == 1 then if msgcontains(msg, "kaytan island") then town[cid] = 2 destination[cid] = {x = 159, y = 387, z = 6} npcHandler:say("You have to choose your vocation.: {KNIGHT}, {PALADIN}, {SORCERER}, OR {DRUID}?", cid) npcHandler.topic[cid] = 2 else npcHandler:say("What you want?", cid) end elseif npcHandler.topic[cid] == 2 then if msgcontains(msg, "sorcerer") then npcHandler:say("A SORCERER! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!", cid) npcHandler.topic[cid] = 3 vocation[cid] = 1 elseif msgcontains(msg, "druid") then npcHandler:say("A DRUID! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!", cid) npcHandler.topic[cid] = 3 vocation[cid] = 2 elseif msgcontains(msg, "paladin") then npcHandler:say("A PALADIN! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!", cid) npcHandler.topic[cid] = 3 vocation[cid] = 3 elseif msgcontains(msg, "knight") then npcHandler:say("A KNIGHT! ARE YOU SURE? THIS DECISION IS IRREVERSIBLE!", cid) npcHandler.topic[cid] = 3 vocation[cid] = 4 else npcHandler:say("{KNIGHT}, {PALADIN}, {SORCERER}, OR {DRUID}?", cid) end elseif npcHandler.topic[cid] == 3 then if msgcontains(msg, "yes") then npcHandler:say("SO BE IT!", cid) doPlayerSetVocation(cid, vocation[cid]) doPlayerSetTown(cid, town[cid]) local destination = destination[cid] npcHandler:releaseFocus(cid) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, destination) doSendMagicEffect(destination, CONST_ME_TELEPORT) else npcHandler:say("THEN WHAT? {KNIGHT}, {PALADIN}, {SORCERER}, OR {DRUID}?", cid) npcHandler.topic[cid] = 2 end end return true end local function onAddFocus(cid) town[cid] = 0 vocation[cid] = 0 destination[cid] = 0 end local function onReleaseFocus(cid) town[cid] = nil vocation[cid] = nil destination[cid] = nil end npcHandler:setCallback(CALLBACK_ONADDFOCUS, onAddFocus) npcHandler:setCallback(CALLBACK_ONRELEASEFOCUS, onReleaseFocus) npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Aquela parte ali na qual fala Kaytan Island que eu queria que nao existisse, e que fosse substutuida por uma nova coordenada de acordo com a vocation que o jogador escolher na hora.
-
The Oracle Especifico
Isso ai =]
-
The Oracle Especifico
Boa noite seus lindos Eu to aqui montando meu servidor e me deparei com uma coisa que eu nem sei fazer por ser mapper. Scripts e sprites eu tou ferrado, ai eu recorro voces, mas meu mapa ta iradooo. O caso eh o seguinte, eu preciso de um The Oracle que teleporte a vocation escolhida para um respectivo local ... O cara vai la, escolhe por exemplo sorcerer, logo apos fala que ele sera teleportado para o local dos sorcerer e ele diz yes Mesma coisa com Knight, ele escolhe ser Knight no the Oracle e o npc fala que ele sera movido para o Quartel dos Knights ... Eu tentei mesclar umas scripts que faziam isso mas deu merda, nao sei mesmo, se tiver como me ajudar, vai ser bem legal ... Oq pega tambem que ele tem que ganhar a vocation e ser teleportado na mesma hora, pq pode ocorrer dele escolher uma vocacao e ficar na ilha, ele tem que falar a vocation e ja ser teleportado para o local respectivo da sua vocation ... Amo voces! VlW!!
-
Sistema de Dual Wield
Ajuda eu Vei ;(
- [TUTORIAL] Adicionando novas mounts
-
Mostrar coldown que ainda falta ...
Alguem pode ajudar ai?
-
Spell que da magic level
Alguem ajuda ae? s2
-
[Sistema][TFS 1.1 1.2][WindowsModal]Crafting Avançado
Boa tarde DkAngel83 ... Eu to olhando aqui, adicionei todas as scripts e parece estar funcionando perfeitamente, porem mesmo nos itens iniciais como arrow por exemplo, fala que preciso de Basic Smithing 10 e fala que tenho (-1) ... E eu nao tenho Smithing como skill, ou nao peguei, sei la, como eu faço isso? Tem uma msg na Window desta forma ( No Specialty training ), como se eu nao tivesse ainda, como eu pego ela ou adiciono? s2
-
Mostrar coldown que ainda falta ...
Esta certo, aguardarei aqui então, veja onde errei e me diga oque devo fazer, obrigado
-
Spell que da magic level
Ajudar até ajuda, mas não era bem isso, eu tentei fazer eu mesmo usando Utito tempo como base, e não funcionou :/
-
Mostrar coldown que ainda falta ...
Fiz isto, alem de não mostrar o coldown da spell, ainda por cima da Debug quando eu uso :/ Será que é alguma coisa sobre o arquivo Ice strike.lua, data/spells/spells.xml ou também agora no data/lib/034-exhaustion.lua? Nao sei mesmo oque ta pegando, pois no console nao da nenhum erro ...
-
Spell que da magic level
Boa madrugada galera do TK, venho pedir se alguém pode me mandar uma script estilo Utito Tempo, porem que aumentasse o magic level em 30%. Obrigado s2 Alguem ajuda ai? u.u
-
Mostrar coldown que ainda falta ...
Fui na pasta Data/lib, criei um arquivo com nome 034-exhaustion.lua E colei exatamente isso que mandou dentro do arquivo, mas não mudou absolutamente nada ... Talvez tenho que mexer ainda em outro local?
-
Mostrar coldown que ainda falta ...
Deu erro, passarei aqui como esta a spell data/spells/spells.xml <instant group="attack" name="Ice Strike" words="Ice Strike" lvl="1" mana="10" prem="0" range="4" needtarget="1" blockwalls="1" exhaustion="2000" groupcooldown="2000" needlearn="0" script="attack/ice strike.lua"> <vocation name="Mage"/> </instant> ice strike.lua Uso tfs 1.1 caso seja preciso saber, e deu este erro no console, vou postar ela por esse site de upload porque não sei postar ela diretamente aqui .. http://imgur.com/owoVjJw
-
Mostrar coldown que ainda falta ...
Apenas adiciono isto ai na script? Ficando assim? local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) function onGetFormulaValues(cid, level, maglevel) min = -((level * 1.1) + (maglevel * 1.4) + 8) max = -((level * 2.2) + (maglevel * 2.2) + 14) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end function onCastSpell(cid, var) local waittime = 1 local storage = 5963 if exhaustion.check(cid, storage) then doCreatureSay(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.", TALKTYPE_MONSTER) return false end exhaustion.set(cid, storage, waittime) return TRUE end