-
-
-
Limite de uso item
function onUse(cid, var, item, frompos, item2, topos) if item.itemid == item.itemid then local tempo = 20.0 -- em segundos local guid = getPlayerGUID(cid) if exhaustion[guid] and exhaustion[guid] - os.clock() > 0 then return not doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Espere um pouco para poder usar novamente.") end exhaustion[guid] = os.clock() + tempo doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) end doPlayerRemoveItem(cid, item.uid, 1) doSendMagicEffect(frompos, 28) doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE) return true end Para ajustar o time do exhaust, é só alterar o "local tempo" (em segundos).
-
-
(Resolvido)AJUDEM Anti Paralyze
Tá tomando paralise pq está configurado para o SLOT DO HELMET, como eu disse, deixei pré-configurado para usar no HELMET. Testa assim: function onEquip(cid, item, slot) doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) return true end function Paralizy(cid) local HelmetID = 12692 --- ID DO ITEM if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == HelmetID then doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) end return true end
-
(Resolvido)AJUDEM Anti Paralyze
Coloquei pré-configurado para usar no slot do helmet: movements/scripts: function onEquip(cid, item, slot) doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) return true end function Paralizy(cid) local HelmetID = 3971 --- ID DO ITEM if getPlayerSlotItem(cid, CONST_SLOT_HEAD).itemid == HelmetID then doRemoveCondition(cid, CONDITION_PARALYZE) addEvent(Paralizy, 1*100, cid) end return true end movements.xml: <movevent type="Equip" itemid="3971" slot="head" event="script" value="helmetparalise.lua"/> Bem auto-explicativo. Qualquer mudança que fizer o script, também deve alterar no XML.
-
Pedido de spell
O script está certo, testei na minha base amigo. Você colocou errado no spells.xml, tenta assim. Teve algum erro na distro? Se tiver posta. <instant name="Teleport" words="teleport" lvl="1" mana="1" prem="0" direction="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="sasuke gaiden/teleport.lua"> <vocation id="512"/> <vocation id="517"/> </instant>
-
-
Item ou NPC que da Rollback de Status para um lvl Determinado.
Qual TFS? @edit Desculpe, já vi. O item irá sumir?
-
ALGUMAS MAGIAS ESTAO SEM EFEITOS
34 é o número do efeito, só você alterar para um existente. Talvez o seu cliente não possua a sprite do efeito no script.
-
yoroshigod alterou sua foto pessoal
-
Item que faz aprender magia
Passa o script. Qual TFS?
-
Como colocar cor nas magias?
No config.lua: Siga o modelo(exemplo): De <instant name="exori" words="exori" lvl="8" mana="1" prem="0" direction="1" range="6" blockwalls="1" exhaustion="500" needlearn="0" script="exori"> Para <instant name="" words="exori" lvl="8" mana="1" prem="0" direction="1" range="6" blockwalls="1" exhaustion="500" needlearn="0" script="exori">
-
(Resolvido)Summon que cura o Player
Pode ser cura em área? Qual TFS?
-
Npc Help
Cria um arquivo chamado "scriptnpc": local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'sim') and talkState[talkUser] == nil then selfSay('Quer conhecer a Cidade?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'sim') and talkState[talkUser] >= 1) then selfSay('Ta certo vai ate o bau e pega uns itens, e fale com o guarda!', cid) talkState[talkUser] = nil end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) No NPC em sí: <npc name="Joaozinho" script="scriptnpc.lua" walkinterval="0" floorchange="0"> <health now="100" max="100"/> <look type="133" head="95" body="0" legs="77" feet="0" addons="0" /> <parameters> <parameter key="message_greet" value="Oi, Acordou Bem?"/> <parameter key="message_walkaway" value="Tchau!" /> <parameter key="message_farewell" value="Tchau!"/> </parameters> </npc>
-
Pedido de spell
Qual TFS mano? Testei aqui e não teve erro (desculpa a demora). @Edit Testa assim: local c = { toPos = {x = 949, y = 998, z = 7}, -- cordenadas do local destino createItem = {1387}, -- 1387 id do tp removeTime = 10 * 1000 -- tempo pro tp sumir em segundos } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) -- efeito area setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE) -- efeito lançar local arr = { {3}, } local area = createCombatArea(arr) setCombatArea(combat, area) function onCastSpell(cid, var) doCreateTeleport(c.createItem[1], c.toPos, changeposbydir(getThingPos(cid), getPlayerLookDir(cid), 1)) addEvent(function() local thing = getTileItemById(changeposbydir(getThingPos(cid), getPlayerLookDir(cid), 1), c.createItem[1]).uid if(thing ~= 0) then doRemoveItem(thing, c.createItem[1]) end end, c.removeTime) doCombat(cid, combat, var) return true end
-
-
-
Preciso de um script
Só mudar if getPlayerStorageValue(cid, storage) > 0 then para if getPlayerStorageValue(cid, storage) >= 1 then
- Preciso de um script para pesca
-
(Resolvido)Salvar Vocation
Se a vocação "Madara" for de ID: 10, então, em vocatios.xml tem que estar, por exemplo: <vocation id="10" name="Madara"............fromvoc="'10">
-
Npc não responde nada-IMPOSSÍVEL
Crie um script em NPC/Scripts chamado "default.lua" e adicione isso: 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 npcHandler:addModule(FocusModule:new()) Depois no NPC você colocar script="default.lua", exemplo: <npc name="João" script="default.lua" walkinterval="50000" floorchange="0">