Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. tenta fazer outra função function getPlayerInFight(cid) return (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) end getPlayerInFight(cid) == true ou getPlayerInFight(cid) == false obs: só para saber 1 = true 0 = false
  2. Não precisa ser diretamente nas souce,só colocar isso na lib/050-function function getPlayerPz(cid) return (getTilePzInfo(getCreaturePosition(cid)) == TRUE) end ai modo de uso + ou - if getPlayerPz(cid) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'está em pz') else doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'NÃO está em pz') end
  3. Não funcionou? Mentira,eu acabei de testar para ver o problema não está no script deve ser da própria vocation,da licença né.
  4. fiz aqui,só n entendi porque vc colocou mana potion só para knights mais tudo bem... ultimate_health.lua local MIN = 800 local MAX = 1010 local EMPTY_POTION = 7635 local vocations = {4,8,12} local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE elseif hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE elseif(not isInArray(vocations, getPlayerVocation(cid)) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE elseif doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Uiiii...", TALKTYPE_ORANGE_1) return TRUE end great_mana.lua local MIN = 550 local MAX = 750 local EMPTY_POTION = 7635 local vocations = {1,5,9} local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE elseif hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE elseif(not isInArray(vocations, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 80 and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only sorcerers of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE elseif doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) doPlayerAddItem(cid, EMPTY_POTION, 0) return TRUE end mana_potion.lua local MIN = 70 local MAX = 130 local EMPTY_POTION = 7636 local vocations = {4,8,12} local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 80)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE elseif hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE elseif(not isInArray(vocations, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 130 and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only knights above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE elseif doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Hmm...", TALKTYPE_ORANGE_1) return TRUE end
  5. sim,me passa o script de uma das potion e me diz as voc que poderão usar que eu te mostro como é que se faz.
  6. é a melhor seria storage por account,mais isso já tem,se não me engano é do mock :X no caso do storage por ip quem tiver em lan house ta fudido rairairai mais parabéns xotservx ficou ótimo seu work :] bjd
  7. você está fazendo uma action então se usa function onUse,não entendi a function onCastSpell,que no caso é usada só para epslls =X
  8. Ok fiz um exemplo e editei um script para você ve como fica... vai em actions/scripts/liquids vai ver o nome das potions lá ai você adiciona a variavel exemplo: local vocations = {3,7,11} -- vocations que vao usar a potion if(not isInArray(vocations, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 80 and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only paladins of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end --------- olha como ficou minha ultimate_health.lua local MIN = 10 local MAX = 20 local vocations = {3,7,11,4,8,12} -- vocation que podem usar a potion local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if(not isInArray(vocations, getPlayerVocation(cid)) or getPlayerLevel(itemEx.uid) < 130 and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only Paladins and knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doCreatureAddHealth(itemEx.uid,((math.random(MIN, MAX)/100)*getCreatureMaxHealth(cid))) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return TRUE end
  9. então faz assim(exemplo): Vermelho é o id da voc que vai pode usar a potion tbm
  10. Vodkart

    Reset System

    rairairairai falei cara,deixa pra próxima,os distros tão um lixo mesmo. e não adianta fazer pelo npc,porque se usa as mesmas funções.
  11. então nem precisa usar addEvent pro effect :X rand = math.random(1, #config) doSendMagicEffect(config[rand], 10) mew = doSummonCreature("Mew", config[rand]) addEvent(doRemoveCreature,time*30*50, mew) end
  12. tenta rand = math.random(1, #config) addEvent(doSendMagicEffect, 30*1000, config[rand], 6) mew = doSummonCreature("Mew", config[rand]) addEvent(doRemoveCreature,time*30*50, mew) end
  13. ? Qual seu servidor? eu testei aqui e funcionou,o monstro é summonado e depois retirado.
  14. function onUse(cid, item, frompos, item2, topos) time,time2 = 10,20 -- em segundos local config = { [1] = {"cyclops",{x=1035, y=1022, z=7, stackpos = 253}}, [2] = {"Demon",{x=1040, y=1039, z=7, stackpos = 253}}, [3] = {"Hydra",{x=228, y=32, z=7, stackpos = 253}} } r = math.random(1, #config) function back() local retirar = getThingfromPos(config[r][2]) if retirar.itemid > 0 then doRemoveCreature(retirar.uid) else return FALSE end end addEvent(doSendMagicEffect, time*1000-50, config[r][2], 6) addEvent(doCreateMonster, time*1000, config[r][1], config[r][2]) addEvent(back,time2*1000) end
  15. Vodkart

    Reset System

    Faz tudo pela database então,ve se da certo. function onSay(cid, words, param) config = { level= 1000, -- level para resetar RemainingLvl=8, -- level que ficara depois do reset exper=4200, -- Experiência que ficara depois do Reset pid=getPlayerGUID(cid), -- Não Mecha skull="yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull="yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot="yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat="yes", -- player com fight pode resetar "yes para sim e "no" para não mana = 35, -- mana que ficara após o reset health = 185, -- Health que ficara após o reset new_voc = 6 } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE elseif(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE elseif(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) >= config.level then if getPlayerVocation(cid) == 2 then -- Vocação que o player precisa ter setPlayerStorageValue(cid,1020,getResets(cid)+1) doTeleportThing(cid, {x = 160, y = 54, z = 7}) -- pos do seu templo doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana..",`vocation` = ".. new_voc .." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "Você precisa ser druid para resetar.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
  16. Vodkart

    Reset System

    Versão 8.7? ta explicado,nos distros estão faltando muita função,nem vale a pena perde tempo vei.
  17. ah então vo pedir pro Demonbholder porque estou mto ocupado e com a cabeça em outro lugar. tbm o cara não sabe nem pedir,fala que quer um Item Que Se Tranformasse Em Varios só que não da mais explicações.
  18. hihi mto legal o script gostei mesmo,parabéns :]
  19. Vodkart

    Reset System

    está dizendo que não possui essa função coloca então de vez de: doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) põe: doTeleportThing(cid, {x = 157, y = 50, z = 7}) ai vc coloca a coordenada certa do seu templo.
  20. retirado
  21. Já tentou usar AddEvent para o demon ser sumonado depois? ai você faz o seguinte coloca addEvent(doSendMagicEffect(pos, 4), time*30*1000-100, pos) e no Event de sumonar o monstro você coloca time*30*1000
  22. Vodkart

    Reset System

    function onSay(cid, words, param) config = { level= 1000, -- level para resetar RemainingLvl=8, -- level que ficara depois do reset exper=4200, -- Experiência que ficara depois do Reset pid=getPlayerGUID(cid), -- Não Mecha skull="yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull="yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot="yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat="yes", -- player com fight pode resetar "yes para sim e "no" para não mana = 35, -- mana que ficara após o reset health = 185 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE elseif(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE elseif(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) >= config.level then if getPlayerVocation(cid) == 2 then -- Vocação que o player precisa ter setPlayerStorageValue(cid,1020,getResets(cid)+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) setPlayerPromotionLevel(cid, 1) doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "Você precisa ser druid para resetar.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
  23. Vodkart

    Reset System

    quer ensinar padre a rezar missa agora? vo te explicar então sabidão se o jogador tiver o level e não tiver a vocação será executado só até ai. agora presta bem a atenção se o jogador tiver a vocação 2 o script vai ser executado caso ele não tiver olha a mensagem que vai mandar "Você precisa do level "..config.level.." ou mais para resetar." agora me diz... oque tem a ver a vocation do player com o level para resetar? me diz oque você quer que seu script faça que eu poderei te ajudar,por exemplo a vocation 1 vai pra 5 a vocation 2 vai pra 6 e assim por diante... é isso?
  24. @up não querendo me meter mais já me metendo,creio que o pedido número dois seja impossível,não dá para colocar na caixa de mensagem "Ir evento" ou "Não ir evento",até deve dar só que você teria contratar algum para mecher nas sources.
  25. ve se é isso: function onUse(cid, item, fromPosition, itemEx, toPosition) -- chance em porcentagem items = { {id= 2472,chance=1}, {id= 2492,chance=2}, {id= 2466,chance=3}, {id= 2487,chance=4}, {id= 8891,chance=5}, {id= 2476,chance=20}, {id= 2463,chance=25} } local RARE_RUSTY_ARMOR = 9810 if itemEx.itemid == RARE_RUSTY_ARMOR then local m = math.random(1,#items) if math.random(1,100) <= items[m].chance then doTransformItem(itemEx.uid,items[m].id) else doRemoveItem(itemEx.uid) doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"The armor was already damaged so badly that it broke when you tried to clean it.") end end return TRUE end
  • Quem Está Navegando   0 membros estão online

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