Ir para conteúdo

Wakon

Héroi
  • Registro em

  • Última visita

Solutions

  1. Wakon's post in (Resolvido)[Ajuda] script necessário storage was marked as the answer   
    Testa:
    local storage = 32444 local coin = 1967 local lever = { [6004] = {1,12698}, [6005] = {1,12713}, [6006] = {1,12723}, [6007] = {1,12751}, } function onUse(cid,item,fromPosition,itemEx,toPosition) if getPlayerStorageValue(cid, storage) <= 0 then     if doPlayerRemoveItem(cid,coin,lever[item.actionid][1]) == TRUE then setPlayerStorageValue(cid, storage, 1) doPlayerAddItem(cid,lever[item.actionid][2]) doPlayerSendTextMessage(cid,22,"Você pegou o " .. getItemNameById(lever[item.actionid][2])..".") doSendMagicEffect(getCreaturePosition(cid), 13) else doPlayerSendCancel(cid, "Você precisa de "..lever[item.actionid][1].." " ..getItemNameById(coin)..".") end else return doPlayerSendCancel(cid, "Você não pode trocar novamente.") end return true end
  2. Wakon's post in (Resolvido)[AJUDA] Apenas dando EXP... was marked as the answer   
    Tente assim:
    function onUse(cid, item, fromPosition, itemEx, toPosition)     if(getPlayerStorageValue(cid, 10012) < 1) then         doPlayerAddExp(cid, 250000, true, true)         setPlayerStorageValue(cid, 10012, 1)     end     if(item.uid == 3088) then         if(getPlayerStorageValue(cid, 30) == 53) then             doPlayerAddItem(cid, 9776, 1)             setPlayerStorageValue(cid, 30, 54)             Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.")         else             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")         end     elseif(item.uid == 3089) then         if(getPlayerStorageValue(cid, 30) == 53) then             doPlayerAddItem(cid, 9778, 1)             setPlayerStorageValue(cid, 30, 54)             Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.")         else             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")         end     elseif(item.uid == 3090) then         if(getPlayerStorageValue(cid, 30) == 53) then             doPlayerAddItem(cid, 9777, 1)             setPlayerStorageValue(cid, 30, 54)             Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.")         else             doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")         end     end     return true end Lembrando que a storage para ganhar o item é 30 e não 10012.
  3. Wakon's post in (Resolvido)[PEDIDO] Aumentar número de caracters dentro do tibia.exe was marked as the answer   
    Dá uma olhada nesse tópico:
    http://www.tibiaking.com/forum/topic/55103-custom-cliente-todas-as-vers%C3%B5es-qualquer-ip/

    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → Suporte OTServ → Suporte de OTServ Geral"
    Para: "OTServ → Suporte OTServ → Suporte de Clients"
  4. Wakon's post in (Resolvido)Diminuir rates de X vocation was marked as the answer   
    Tente trocar o shielding para 3.0:
    <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="3" gainhpamount="2" gainmanaticks="1" gainmanaamount="4" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="yes">         <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="3.0" fishing="1.1" experience="1.0"/>     </vocation>
  5. Wakon's post in (Resolvido)[PEDIDO] Ganhar tal item ao entrar no TP was marked as the answer   
    Em "Data/movements/scripts" adicione newtpitem.lua:
    local t = { storage = 23444, -- Só mexa se estiver em uso. tp =  { x = 32338, y = 32225, z = 7 }, -- Local onde irá levar. item = 2472 -- Item que irá ganhar. } function onStepIn(cid, item, position, fromPosition)     if getPlayerFreeCap(cid) < getItemWeight(t.item, 1) and getPlayerStorageValue(cid, t.storage) <= 0 then     doPlayerSendCancel(cid, "You not have ".. getItemWeight(t.item, 1) .." cap.")     doTeleportThing(cid, fromPosition)     return doSendMagicEffect(getCreaturePosition(cid), 13)     end          if getPlayerStorageValue(cid, t.storage) <= 0 then             doPlayerAddItem(cid, t.item, 1)             doTeleportThing(cid, t.tp)             doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)             setPlayerStorageValue(cid, t.storage, 1)     else             doTeleportThing(cid, t.tp)             doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)         end     return true end Agora em "Data/movements" abra o movements.xml e adicione:
    <movevent event="StepIn" actionid="8594" script="newtpitem.lua"/> Ai é só colocar a actionid no teleport.
  6. Wakon's post in (Resolvido)[PEDIDO] Uma script que após matar a criatura aparecer um teleport was marked as the answer   
    Vá em "Data/creaturescripts/scripts" copie e cole um arquivo .lua e renomeie para tp.lua, apague tudo e cole:
    local config = {     boss = "rotworm",     msg = "O teleport irá sumir em dois minutos.",     timeToRemove = 120, -- Tempo para remover em segundos.     teleport = { x = 32336, y = 32223, z = 7 }, -- Local onde irá aparecer o TP.     toteleport = { x = 32338, y = 32225, z = 7 } -- Local para onde o teleport irá mandar o player. } local function removal(position)     position.stackpos = 1     if (getThingfromPos(position).itemid == 1387) then         doRemoveItem(getThingfromPos(position).uid)     end     return TRUE end function onKill(cid, target)     if(isMonster(target) and string.lower(getCreatureName(target)) == config.boss) then         doCreateTeleport(1387, config.toteleport, config.teleport)         doCreatureSay(target, config.msg, TALKTYPE_ORANGE_1, 0, 0, getCreaturePosition(target))         addEvent(removal, config.timeToRemove * 1000, config.teleport)     end     return true end Em "Data/creaturescripts" abra o creaturescripts.xml e adicione:
    <event type="kill" name="TP" script="tp.lua"/> Em "Data/creaturescripts/others" abra o login.lua e registre em events antes do ultimo evento:
    'TP', É isso, se der algum problema ou estiver faltando algo, me avise.
  7. Wakon's post in (Resolvido)[Dúvida] Sobre ao importar paredes rme irá reconhecer? was marked as the answer   
    Acho que entendi, e não, ele não irá reconhecer pois está configurado com outro ID.
    Você teria que adicionar no otitemeditor com o mesmo id ou adicionar com um ID qual quer e passar por cima no RME.
    Mesmo você passando a sprite para o seu client, ele iria manter um item que não existe a não ser que você cite no items.otb que sprite é tal ID.
  8. Wakon's post in (Resolvido)[Dúvida] Como passar spr e dat de 8.54 para 9.60? was marked as the answer   
    Tenta usar o Object Builder:
    http://www.tibiaking.com/forum/topic/30624-object-builder/
    Abre a .spr e .dat nele e compila na versão desejada.
  9. Wakon's post in (Resolvido)Systema de pz was marked as the answer   
    Em "Data/creaturescripts/scripts" copie e cole um arquivo .lua, renomeie para battle.lua, apague tudo e cole isso:
    function onThink(cid, interval)      if(getTilePzInfo(getCreaturePosition(cid))) then         doRemoveCondition(cid, CONDITION_INFIGHT)      end end Agora em "Data/creaturescripts" abra o creaturescripts.xml e adicione a tag:
    <event type="think" name="TiraBattle" event="script" value="battle.lua"/> Agora novamente em "Data/creaturescripts/scripts" abra seu login.lua e adicione:
    registerCreatureEvent(cid, "TiraBattle")
  10. Wakon's post in (Resolvido)[PEDIDO] UM CAIXA Q DA 10 ITENS was marked as the answer   
    Usa assim:
    local reward = {7844, 10} -- ID do item e quantidade só para pegar o valor da capacidade(importante). local backpack = 1988 function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerFreeCap(cid) >= getItemWeightById(reward[1], reward[2]) then local backpack = doPlayerAddItem(cid, backpack, 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doAddContainerItem(backpack, reward[1], 1) doRemoveItem(item.uid, 1) else doPlayerSendCancel(cid, 'Você não tem '..getItemWeightById(reward[1], reward[2])..' de capacidade livre.') end return true end Vai adicionando quantas linhas você quiser e sempre muda o valor na variável "reward" para ele pegar o peso dos itens.
  11. Wakon's post in (Resolvido)Problema com Escada was marked as the answer   
    Tenta isso:
    Abre o RME aperte CTRL+J, procure pelo item 459 e adicione ele em cima das escadas, ficando assim:

    Se não funcionar, avise.
  12. Wakon's post in (Resolvido)Spell Target was marked as the answer   
    Muda na tag da spell:
    <instant name="Texz" words="Tets" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="ttt.lua"> Em range="3" coloque range="1"
  13. Wakon's post in (Resolvido)[AJUDA] Como retirar Barra de ataques? OTClient was marked as the answer   
    Vá em "OTClient/Modules" e delete a pasta game_pokemoves.
  14. Wakon's post in (Resolvido){Ajuda} Colocar storage em spell. was marked as the answer   
    Tenta ai:
    -- SpellCreator generated. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel)     return (1500)*-1,(3000)*-1 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel)     return (1600)*-1,(3200)*-1 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_EXPLOSION}local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel)     return (1700)*-1,(3400)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_POWERBOLT}local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{0, 0, 2, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}})) function getDmg_Brush(cid, level, maglevel)     return (1800)*-1,(3500)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,0,1,1,2,0,2,-1,2,-2,2,-1,1,2,2,1,1} -- Areas/Combat for 100ms local combat1_Brush = createCombatObject() setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE) setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatArea(combat1_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel)     return (1500)*-1,(3000)*-1 end setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat1_Brush = {CONST_ANI_ICE}local combat1_Brush = createCombatObject() setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat1_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel)     return (1600)*-1,(3200)*-1 end setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat1_Brush = {CONST_ANI_FIRE}local combat1_Brush_2 = createCombatObject() setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat1_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel)     return (1700)*-1,(3400)*-1 end setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat1_Brush_2 = {CONST_ANI_HOLY}local combat1_Brush_2 = createCombatObject() setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS) setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 2, 0, 0}})) function getDmg_Brush_2(cid, level, maglevel)     return (1800)*-1,(3500)*-1 end setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat1_Brush_2 = {CONST_ANI_WHIRLWINDSWORD,2,-2,1,-2,0,-2,-1,-2,-2,-2,0,-1,-1,-1,1,-1} -- Areas/Combat for 200ms local combat2_Brush_2 = createCombatObject() setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat2_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel)     return (1600)*-1,(3200)*-1 end setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat2_Brush_2 = {CONST_ANI_EXPLOSION}local combat2_Brush_3 = createCombatObject() setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat2_Brush_3,createCombatArea({{2}})) function getDmg_Brush_3(cid, level, maglevel)     return (1700)*-1,(3400)*-1 end setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") local dfcombat2_Brush_3 = {CONST_ANI_SMALLHOLY}local combat2_Brush_3 = createCombatObject() setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat2_Brush_3,createCombatArea({{1, 0, 0, 0, 1}, {1, 1, 2, 1, 1}, {1, 0, 0, 0, 1}})) function getDmg_Brush_3(cid, level, maglevel)     return (1800)*-1,(3500)*-1 end setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") local dfcombat2_Brush_3 = {CONST_ANI_WHIRLWINDCLUB,-2,-1,-2,1,-2,0,-1,0,2,1,2,-1,2,0,1,0} -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part     if (isCreature(cid)) then         doCombat(cid, c, var)         if (dirList ~= nil) then -- Emit distance effects             local i = 2;             while (i < #dirList) do                 doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1])                 i = i + 2             end                 end     end end function onCastSpell(cid, var)     local storage = 21203     if getPlayerStorageValue(cid, storage) <= 0 then     doPlayerSendCancel(cid, "Blocked.")     return true     end     local startPos = getCreaturePosition(cid)     RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)     RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos)     RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)     RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos)     addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)     addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos)     addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)     addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos)     addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos)     addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)     addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos)     return true end
  15. Wakon's post in (Resolvido)[Actions para Talkaction] !spells was marked as the answer   
    Script:
    function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. "  " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid, 2175, text) return TRUE end Tag:
    <talkaction words="!spells" event="script" value="spell.lua"/>
  16. Wakon's post in (Resolvido)Script com problema was marked as the answer   
    O problema está no compat em "Data/lib/100-compat" fiz um teste em um servidor que também estava com problemas no executeQuery e funcionou, tenta ai:
    Abra o 100-compat.lua em "Data/lib" e procure por:
    db.stringComparison = db.stringComparer
    db.executeQuery = db.query
     
    Retire as duas, o por que disso eu não sei, mais ao retirar as duas linhas o executeQuery passou a funcionar.
    Sobre o script, use o do caronte que está 100%.
  17. Wakon's post in (Resolvido)NPC de teleport was marked as the answer   
    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 onThink() npcHandler:onThink() end function onCreatureSay(cid, type, msg)     msg = msg:lower()     if msgcontains(msg, 'hi') then     local toPos = {x = 160, y = 54, z = 7}      --Para onde o jogador será teleportado.     selfSay("Suma daqui!")     doTeleportThing(cid, toPos)     end     return true end npcHandler:addModule(FocusModule:new())
  18. Wakon's post in (Resolvido)[Pedido/Duvida] Premium Tile [Assunto antigo] was marked as the answer   
    Em "Data/movements/scripts" copie e cole um arquivo .lua e renomeie para premmytile.lua, apague tudo e cole:
    function onStepIn(cid, item, position, fromPosition)     if not isPlayer(cid) then         return true     end      if getPlayerPremiumDays(cid) <= 0 then doPlayerSendCancel(cid, "Apenas premium accounts podem passar aqui.") doTeleportThing(cid, fromPosition) doSendMagicEffect(position, 13) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Bem-Vindo a area premium.") doSendMagicEffect(position, 12) end return true end Agora em "Data/movements" abra o movements.xml e adicione a tag:
    <movevent type="StepIn" actionid="25200" event="script" value="premmytile.lua" /> Ai você coloca a actionid 25200 nos locais que apenas premium pode passar.
     
    Agora em "Data/creaturescripts/scripts" copie e cole um arquivo .lua e renomeie para checkpremmy.lua, apague tudo e cole:
    function onLogin(cid) local pos = {x = 160, y = 54, z = 7} local storage = 21590    if getPlayerStorageValue(cid, storage) <= 0 and getPlayerPremiumDays(cid) >= 1 then       setPlayerStorageValue(cid, storage, 1)    end    if getPlayerPremiumDays(cid) >= 1 then    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem "..getPlayerPremiumDays(cid).." dias de premium restantes.")    else    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você é free account.")    end        if getPlayerStorageValue(cid, storage) >= 1 and getPlayerPremiumDays(cid) <= 0 then       doTeleportThing(cid, pos)       doPlayerSendTextMessage(cid, 25, "Sua premium expirou.")       setPlayerStorageValue(cid, storage, -1)       doSendMagicEffect(getPlayerPosition(cid), 13)    end  return true end Em "Data/creaturescripts" abra o creaturescripts.xml e adicione a tag:
    <event type="login" name="CheckPremmy" event="script" value="CheckPremmy.lua"/>
  19. Wakon's post in (Resolvido)Premium Scroll adicionar [VIP] no nick was marked as the answer   
    Tenta trocar o checkvip.lua por esse:
    --[[ by vodkart ]]-- function onLogin(cid) local pos = {x = 160, y = 54, z = 7} -- Posição do templo. local storage = 99983 local tempo = 5 if getPlayerStorageValue(cid, storage) <= 0 and getPlayerPremiumDays(cid) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Agora você é premium account, você será kickado em 5 segundos parar alterar seu nome!") doSendMagicEffect(getPlayerPosition(cid), 36) db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") setPlayerStorageValue(cid, storage, 1) addEvent(doRemoveCreature, tempo*1000, cid, true) end function Vodka(cid) if isPlayer(cid) then db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end end if getPlayerStorageValue(cid, storage) == 1 and getPlayerPremiumDays(cid) < 1 then doTeleportThing(cid, pos) doPlayerSendTextMessage(cid, 25, "Sua premium account acabou, você será kickado em "..tempo.." segundos para alterar o nome.") setPlayerStorageValue(cid, storage, -1) if string.find(tostring(getCreatureName(cid)),"[[VIP]]") then addEvent(Vodka, tempo*1000, cid) end end return TRUE end Ai ele verifica se o player for premium e não tiver a storage ele muda o nome.
  20. Wakon's post in (Resolvido)npc points Ajuda was marked as the answer   
    Testa ai:
    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 local shopWindow = {} local t = { [2195] = {price = 15}, [2493] = {price = 25}, [8931] = {price = 100} } local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks) if t[item] and getPoints(cid) < t[item].price then selfSay("você não tem "..t[item].price.." points", cid) else doPlayerAddItem(cid, item) doPlayerRemovePoints(cid, t[item].price) selfSay("aqui está seu item!", cid) end return true end local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks) if getPoints(cid) >= 0 then doPlayerRemoveItem(cid, item, 1) doPlayerAddPoints(cid, t[item].price) selfSay("Você vendeu o item por "..t[item].price.." points.", cid) end return true end if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = ret.price, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  21. Wakon's post in (Resolvido)Anti Magebot Existe? was marked as the answer   
    Tenta tirar um pouco o fast attack do player.
    Creio que não tenha script para "bloquear" o magebot.
  22. Wakon's post in (Resolvido)Por Favor, ajudem erro ao criar monster de evento was marked as the answer   
    Faz assim, zipa a pasta monsters e anexa aqui, vou testar na minha base pra ver o que é.
     
    @Edit, editei a pasta pra você, testa agora.
     
    monster.rar
  23. Wakon's post in [Pedido] Auto utito tempo was marked as the answer   
    Usa essa hotkey, se a vida for < que 90% usa a runa em você.

    auto 100 if [$hppc < 90] useoncreature 'Runa' self
  24. Wakon's post in (Resolvido)[AJUDA] Problemas com Pots was marked as the answer   
    Troca pelo seu script de potions: Geralmente fica em "Data/actions/scripts/liquids/potions.lua".
    local config = {      removeOnUse = "yes",      usableOnTarget = "yes", -- can be used on target? (fe. healing friend)      splashable = "no",      range = -1,      realAnimation = "no", -- make text effect visible only for players in range 1x1      multiplier = {         health = 1.0,         mana = 1.0     } } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = {     [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion     [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion     [7588] = {empty = 7634, splash = 42, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion     [7591] = {empty = 7635, splash = 42, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion     [8473] = {empty = 7635, splash = 42, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion     [7620] = {empty = 7636, splash = 47, mana = {70, 130}}, -- mana potion     [7589] = {empty = 7634, splash = 47, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion     [7590] = {empty = 7635, splash = 47, mana = {250, 350}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion     [8472] = {empty = 7635, splash = 43, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition)      local potion = POTIONS[item.itemid]      if(not potion) then          return false      end      if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then          if(not config.splashable) then              return false          end          if(toPosition.x == CONTAINER_POSITION) then              toPosition = getThingPosition(item.uid)          end          doDecayItem(doCreateItem(POOL, potion.splash, toPosition))          doRemoveItem(item.uid, 1)          if(not potion.empty or config.removeOnUse) then              return true          end          if(fromPosition.x ~= CONTAINER_POSITION) then              doCreateItem(potion.empty, fromPosition)          else              doPlayerAddItem(cid, potion.empty, 1)          end          return true      end      if(hasCondition(cid, CONDITION_EXHAUST)) then          doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)          return true      end      if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and         not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))     then          doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)          return true      end      if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then          return false      end      local health = potion.health      if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.multiplier.health))) then          return false      end      local mana = potion.mana      if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.multiplier.mana))) then          return false      end      doSendMagicEffect(getThingPosition(itemEx.uid), CONST_ME_MAGIC_BLUE)      if(not config.realAnimation) then          doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)      else          for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do              if(isPlayer(tid)) then                  doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)              end          end      end      doAddCondition(cid, exhaust)      doRemoveItem(item.uid, 1)      if(not potion.empty or config.removeOnUse) then          return true      end      if(fromPosition.x ~= CONTAINER_POSITION) then          doCreateItem(potion.empty, fromPosition)      else          doPlayerAddItem(cid, potion.empty, 1)      end      return true end Não esqueça de configurar ao seu gosto os heals.
  25. Wakon's post in (Resolvido)spell book script was marked as the answer   
    Alguns items em "Data/items/items.xml", alguns em "data/movements/movements.xml" e "data/weapons/weapons.xml".

Informação Importante

Confirmação de Termo