Tudo que Magalhaes92 postou
-
(Resolvido)[PEDIDO] Hp / Mp por porcentagem %%
Desculpa se estou revivendo o tópico, mas e que estou querendo muito isso, pelo fato de meu ot ser lvl auto e Hp e Mp ficam ''Bugados''. Sera algum de vcs podem me ajudar passo a passo de como fazer isso pf ?
-
Npc com limitação de venda
Ola galera, entao ... tava querendo ver se alguem disponibiliza um script de npc que funcionasse da seguinte forma.. Um npc normal vendendo items. So que teria uma limitação de compras ! Exe: Npc vende Magic Plate, mas eu queria que ele vendesse apenas 5 magic plate, despois que vendesse as 5 magic plate acabaria o estoque e nao poderia vender mais ! Sera que alguem pode me ajudar ? Grato desde ja
-
compra com comando e ''moeda'' difrente
Iae galera.. Queria saber se alguém pode disponibilizar um script que funcione de certa maneira... Um char compra um item pelo certo comando ''!buywand''. Mas essa ''Wand'' seria vendida por 7 items.. seria como trocar 7 items pela WAND. Obs: pode ser um npc tbm. Sera que alguem pode ajudar ? - AGRADEÇO DESDE DE JA !
-
XP PARA DONO DO CASTLE
ALGUM ME AJUDA NE UM SCRIPT QUE DA BONUS DE XP PARA DONO DO CASTLE, IGUAL O DA FOTO.
-
bonus de xp para dono guild do castle
Iae galera do TK. Queria exp bonus para quem for dono do castle. Se alguém puder me ajudar pf, pq não to conseguindo por o storage certo se alguem puder me ajudar agradeço desde de ja Uso esse script de Castle 24Hr Actions.XML <!-- Castle 24Hrs --> <action actionid="9999" event="script" value="castlewar1.lua"/> <action actionid="4538" event="script" value="castledoor1.lua"/> castledoor1.LUA function onUse(cid, item, frompos, item2, topos) local config = { STORAGE_GUILD = 123123, -- A 3ª storage configurada em Castle.lua MSG_WELCOME = "Seja bem vindo a vosso castelo!", MSG_FAIL = "Este castelo nao pertence a sua guild" } if getPlayerGuildId(cid) == getGlobalStorageValue(config.STORAGE_GUILD) then doTeleportThing(cid,getThingPos(item.uid)) doTransformItem(item.uid, 1230) doPlayerSendTextMessage(cid, 22, config.MSG_WELCOME) else doPlayerSendTextMessage(cid, 22, config.MSG_FAIL) end return true end castlelever.LUA function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.actionid == 4850) then doTeleportThing(getTopCreature({x=329,y=118,z=5}).uid, {x=329,y=118,z=3}) elseif (item.actionid == 4851) then doTeleportThing(getTopCreature({x=329,y=118,z=3}).uid, {x=329,y=118,z=5}) end return true end castlewar1.LUA ----------------------------------- ---------SCRIPT por PC98------------ NAO REMOVA OS CREDITOS ----------------------------------- function onUse(cid, item, frompos, item2, topos) ------------------ Inicio das Config ------------ local castle_one_name = "Castle24h" -- Nome do castelo 1 local storages = {154154,54321,123123} -- Storages ( se vc eh iniciante, deixe como está...) -------PREMIOs I N D I V I D U A L --------- local premio_por_vezes = 0 -- Premio por vezes de conquista de castelo. (1) = Ativo (0) = Desativa. local premio_vezes = 15 -- Caso ativo, a quantidade de conquista que o player tem, para ganhar PREMIO. local premio = 2157 -- ID do Premio local premio_cont = 100 -- Quantidade do Premio local premio_reset = 0 -- Resetar o contador do premio depois que atingir a meta?? (1) = SIM (0) = NAO -------FIM PREMIOs I N D I V I D U A L --------- ----------------- FIM DAS CONFIG ----------------- local sto_ativ = getGlobalStorageValue(storages[2]) position = getCreaturePosition(cid) if isPlayerGuild(cid) == TRUE then if sto_ativ == 1 or sto_ativ == -1 then guildname = getPlayerGuildName(cid) guild = getPlayerGuildId(cid) guild_sto = getGlobalStorageValue(storages[3]) if guild ~= guild_sto then setPlayerStorageValue(cid,guild_sto,guild) if getPlayerStorageValue(cid,storages[1]) == -1 then setPlayerStorageValue(cid,storages[1],0) end sto_vezes = getPlayerStorageValue(cid,storages[1]) setGlobalStorageValue(storages[3],getPlayerGuildId(cid)) setPlayerStorageValue(cid,storages[1], sto_vezes + 1) sto_vezes_total = getPlayerStorageValue(cid,storages[1]) doBroadcastMessage("O(a) "..getCreatureName(cid).." acabou de conquistar o castelo "..castle_one_name.." para a guild \""..guildname.."\" pela "..sto_vezes_total.."ª vez(s).", 22) doSendMagicEffect(position, 39) if premio_por_vezes == 1 then if getPlayerStorageValue(cid,storages[1]) == premio_vezes then if getItemWeightById(premio,1) <= getPlayerFreeCap(cid) then doBroadcastMessage("O "..getCreatureName(cid).." ganhou uma(o) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!", 21) doPlayerAddItem(cid, premio,premio_cont) doPlayerSendTextMessage(cid, 18, "Voce recebeu o(a) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!") ----------------------------------------------- -- if premio_reset == 1 then -- setPlayerStorageValue(cid,storages[1],0) -- Resetar a contagem end -- ----------------------------------------------- -- else doPlayerSendTextMessage(cid, 18, "Voce nao tem capacidade para ganhar o item. Vamos verificar novamente em 10 segundos!") addEvent(additem,10000,cid,premio,premio_cont,premio_reset) end end end else doPlayerSendCancel(cid,"Este castelo ja foi conquistado pela sua guild!") doSendMagicEffect(position, 2) end else doPlayerSendCancel(cid,"O sistema está desativado") end else doPlayerSendCancel(cid,"É nescessario ter guild para dominar o castelo!") doSendMagicEffect(position, 2) end end ------------------------- por pc98 function additem(cid,premio,premio_cont,premio_reset) if getItemWeightById(premio,1) <= getPlayerFreeCap(cid) then doPlayerAddItem(cid, premio,premio_cont) doPlayerSendTextMessage(cid, 18, "Voce recebeu o(a) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!") if premio_reset == 1 then setPlayerStorageValue(cid,storages[1],0) end stopEvent(additem) else doPlayerSendTextMessage(cid, 18, "Voce nao tem capacidade para ganhar o item. Verificando novamente em 10 segundos!") addEvent(additem,10000,cid) end end ------------------------- por pc98 function isPlayerGuild(cid) if getPlayerGuildName(cid) ~= "" then return TRUE else return FALSE end end movements.XML <movevent type="StepIn" actionid="9998" event="script" value="castlewar2.lua"/> <movevent type="StepIn" actionid="9995" event="script" value="level.lua"/> castlewar2.lua function onStepIn(cid, item, position, fromPosition) local castle_one_name = "Castle24H" -- Nome do castelo 1 local storages = {154154,54321,123123} -- Storages ( se vc eh iniciante, deixe como está...) local sto_ativ = getGlobalStorageValue(storages[2]) position = getCreaturePosition(cid) if isPlayerGuild(cid) == TRUE then if sto_ativ == 1 or sto_ativ == -1 then guildname = getPlayerGuildName(cid) guild = getPlayerGuildId(cid) guild_sto = getGlobalStorageValue(storages[3]) if guild ~= guild_sto then doBroadcastMessage("O(a) Jogador "..getCreatureName(cid)..". Esta Tentando Invadir O "..castle_one_name.." Da Guild \""..guildname..". Aviso Donos Atuais", 22) else doPlayerSendCancel(cid,"Avance") end else doPlayerSendCancel(cid,"Avance") end else doPlayerSendCancel(cid,"Avance") end return true end function isPlayerGuild(cid) if getPlayerGuildName(cid) ~= "" then return TRUE else return FALSE end end
-
Exp Bonus para dono do castle
Iae galera do TK. Queria exp bonus para quem for dono do castle. Se alguém puder me ajudar pf, pq não to conseguindo por o storage certo se alguem puder me ajudar agradeço desde de ja Uso esse script de Castle 24Hr Actions.XML <!-- Castle 24Hrs --> <action actionid="9999" event="script" value="castlewar1.lua"/> <action actionid="4538" event="script" value="castledoor1.lua"/> castledoor1.LUA function onUse(cid, item, frompos, item2, topos) local config = { STORAGE_GUILD = 123123, -- A 3ª storage configurada em Castle.lua MSG_WELCOME = "Seja bem vindo a vosso castelo!", MSG_FAIL = "Este castelo nao pertence a sua guild" } if getPlayerGuildId(cid) == getGlobalStorageValue(config.STORAGE_GUILD) then doTeleportThing(cid,getThingPos(item.uid)) doTransformItem(item.uid, 1230) doPlayerSendTextMessage(cid, 22, config.MSG_WELCOME) else doPlayerSendTextMessage(cid, 22, config.MSG_FAIL) end return true end castlelever.LUA function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.actionid == 4850) then doTeleportThing(getTopCreature({x=329,y=118,z=5}).uid, {x=329,y=118,z=3}) elseif (item.actionid == 4851) then doTeleportThing(getTopCreature({x=329,y=118,z=3}).uid, {x=329,y=118,z=5}) end return true end castlewar1.LUA ----------------------------------- ---------SCRIPT por PC98------------ NAO REMOVA OS CREDITOS ----------------------------------- function onUse(cid, item, frompos, item2, topos) ------------------ Inicio das Config ------------ local castle_one_name = "Castle24h" -- Nome do castelo 1 local storages = {154154,54321,123123} -- Storages ( se vc eh iniciante, deixe como está...) -------PREMIOs I N D I V I D U A L --------- local premio_por_vezes = 0 -- Premio por vezes de conquista de castelo. (1) = Ativo (0) = Desativa. local premio_vezes = 15 -- Caso ativo, a quantidade de conquista que o player tem, para ganhar PREMIO. local premio = 2157 -- ID do Premio local premio_cont = 100 -- Quantidade do Premio local premio_reset = 0 -- Resetar o contador do premio depois que atingir a meta?? (1) = SIM (0) = NAO -------FIM PREMIOs I N D I V I D U A L --------- ----------------- FIM DAS CONFIG ----------------- local sto_ativ = getGlobalStorageValue(storages[2]) position = getCreaturePosition(cid) if isPlayerGuild(cid) == TRUE then if sto_ativ == 1 or sto_ativ == -1 then guildname = getPlayerGuildName(cid) guild = getPlayerGuildId(cid) guild_sto = getGlobalStorageValue(storages[3]) if guild ~= guild_sto then setPlayerStorageValue(cid,guild_sto,guild) if getPlayerStorageValue(cid,storages[1]) == -1 then setPlayerStorageValue(cid,storages[1],0) end sto_vezes = getPlayerStorageValue(cid,storages[1]) setGlobalStorageValue(storages[3],getPlayerGuildId(cid)) setPlayerStorageValue(cid,storages[1], sto_vezes + 1) sto_vezes_total = getPlayerStorageValue(cid,storages[1]) doBroadcastMessage("O(a) "..getCreatureName(cid).." acabou de conquistar o castelo "..castle_one_name.." para a guild \""..guildname.."\" pela "..sto_vezes_total.."ª vez(s).", 22) doSendMagicEffect(position, 39) if premio_por_vezes == 1 then if getPlayerStorageValue(cid,storages[1]) == premio_vezes then if getItemWeightById(premio,1) <= getPlayerFreeCap(cid) then doBroadcastMessage("O "..getCreatureName(cid).." ganhou uma(o) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!", 21) doPlayerAddItem(cid, premio,premio_cont) doPlayerSendTextMessage(cid, 18, "Voce recebeu o(a) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!") ----------------------------------------------- -- if premio_reset == 1 then -- setPlayerStorageValue(cid,storages[1],0) -- Resetar a contagem end -- ----------------------------------------------- -- else doPlayerSendTextMessage(cid, 18, "Voce nao tem capacidade para ganhar o item. Vamos verificar novamente em 10 segundos!") addEvent(additem,10000,cid,premio,premio_cont,premio_reset) end end end else doPlayerSendCancel(cid,"Este castelo ja foi conquistado pela sua guild!") doSendMagicEffect(position, 2) end else doPlayerSendCancel(cid,"O sistema está desativado") end else doPlayerSendCancel(cid,"É nescessario ter guild para dominar o castelo!") doSendMagicEffect(position, 2) end end ------------------------- por pc98 function additem(cid,premio,premio_cont,premio_reset) if getItemWeightById(premio,1) <= getPlayerFreeCap(cid) then doPlayerAddItem(cid, premio,premio_cont) doPlayerSendTextMessage(cid, 18, "Voce recebeu o(a) "..getItemNameById(premio).." como recompensa das suas "..premio_vezes.." conquistas!") if premio_reset == 1 then setPlayerStorageValue(cid,storages[1],0) end stopEvent(additem) else doPlayerSendTextMessage(cid, 18, "Voce nao tem capacidade para ganhar o item. Verificando novamente em 10 segundos!") addEvent(additem,10000,cid) end end ------------------------- por pc98 function isPlayerGuild(cid) if getPlayerGuildName(cid) ~= "" then return TRUE else return FALSE end end movements.XML <movevent type="StepIn" actionid="9998" event="script" value="castlewar2.lua"/> <movevent type="StepIn" actionid="9995" event="script" value="level.lua"/> castlewar2.lua function onStepIn(cid, item, position, fromPosition) local castle_one_name = "Castle24H" -- Nome do castelo 1 local storages = {154154,54321,123123} -- Storages ( se vc eh iniciante, deixe como está...) local sto_ativ = getGlobalStorageValue(storages[2]) position = getCreaturePosition(cid) if isPlayerGuild(cid) == TRUE then if sto_ativ == 1 or sto_ativ == -1 then guildname = getPlayerGuildName(cid) guild = getPlayerGuildId(cid) guild_sto = getGlobalStorageValue(storages[3]) if guild ~= guild_sto then doBroadcastMessage("O(a) Jogador "..getCreatureName(cid)..". Esta Tentando Invadir O "..castle_one_name.." Da Guild \""..guildname..". Aviso Donos Atuais", 22) else doPlayerSendCancel(cid,"Avance") end else doPlayerSendCancel(cid,"Avance") end else doPlayerSendCancel(cid,"Avance") end return true end function isPlayerGuild(cid) if getPlayerGuildName(cid) ~= "" then return TRUE else return FALSE end end
-
USAR O ITEMS QUANTAS VEZES QUISER
Muito Obrigado !
-
USAR O ITEMS QUANTAS VEZES QUISER
Iae galera Então .. tenho esse script a que, so que ele so usa 1 vez, queria que a pessoa usasse sem limitação, sera que aguem pode ajudar ? -- Script By: Abreu -- local exp2 = 50000000 -- Exp ganha ao usar local lor = 494892 -- Storage function onUse(cid, item, frompos, topos) if getPlayerStorageValue(cid, lor) < 1 then doPlayerAddExp(cid, exp2) doRemoveItem(item.uid, 1) doPlayerPopupFYI(cid, 'Você ganhou 50.000.000 de EXP') setPlayerStorageValue(cid, lor, 1) else getPlayerStorageValue(cid,lor) doPlayerPopupFYI(cid,"Você não pode usar isso mais de uma vez !.") doRemoveItem(item.uid,1) end return true end
-
HP+MP NO ADDON
IAE GALERA DO TK. TERIA COMO COLOCAR PRA GANHAR HP E MP NESSES ADDONS QUE ESTAO AQUE ? SCRIPT: function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) -------------------------------------------- CONFIGURE ABAIXO------------------------------------------ local effect = { [149] = 66, [145] = 66, [264] = 36, [253] = 36, [252] = 41, [251] = 41, [229] = 32, [229] = 32 --para adicionar mais outfits e eventos apenas coloque uma virgula depois do 4 e siga o padrão. } local tempo = 300 --tempo entre 1 efeito e outro em milisegundos -------------------------------------------FIM DA CONFIGURAÇÃO --------------------------------------- local o,c= effect[old.lookType],effect[current.lookType] if getPlayerAccess(cid) > 2 then return true elseif (not o or not c or o) then stopEvent(events[getPlayerGUID(cid)]) end if c then function WalkEffect(cid, c, pos) if not isCreature(cid) then return LUA_ERROR end if c then frompos = getThingPos(cid) doSendMagicEffect(frompos, c) events[getPlayerGUID(cid)] = addEvent(WalkEffect, tempo, cid, c, frompos) end return true end WalkEffect(cid, c, {x=0, y=0, z=0}) end return true end
-
HP+MP NO ADDON
IAE GALERA DO TK. TERIA COMO COLOCAR PRA GANHAR HP E MP NESSES ADDONS QUE ESTAO AQUE ? SCRIPT: function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) -------------------------------------------- CONFIGURE ABAIXO------------------------------------------ local effect = { [149] = 66, [145] = 66, [264] = 36, [253] = 36, [252] = 41, [251] = 41, [229] = 32, [229] = 32 --para adicionar mais outfits e eventos apenas coloque uma virgula depois do 4 e siga o padrão. } local tempo = 300 --tempo entre 1 efeito e outro em milisegundos -------------------------------------------FIM DA CONFIGURAÇÃO --------------------------------------- local o,c= effect[old.lookType],effect[current.lookType] if getPlayerAccess(cid) > 2 then return true elseif (not o or not c or o) then stopEvent(events[getPlayerGUID(cid)]) end if c then function WalkEffect(cid, c, pos) if not isCreature(cid) then return LUA_ERROR end if c then frompos = getThingPos(cid) doSendMagicEffect(frompos, c) events[getPlayerGUID(cid)] = addEvent(WalkEffect, tempo, cid, c, frompos) end return true end WalkEffect(cid, c, {x=0, y=0, z=0}) end return true end
-
kikar all
8.60
- kikar all
-
Retirar premium account [FREE]
a premium account esta gratis, quero retirar !
-
Retirar premium account [FREE]
Iae galera, tenho um servidor baiak rox, queria retirar por completo o (premium account) Que esta [FREE] do servidor, alguém poderia me ajudar ???
-
ERRO NPC
Funcionou, vllw man !
-
alguem sabe esse look type ?
Obg !!
-
alguem sabe esse look type ?
-
COR DA SPELLS
Funfou nao =[
-
COR DAS POTIONS
O mano, mas o cade o +{1111} tanto q heala que nao sai ??
-
COR DA SPELLS
O mano me ajuda aque pf, pq ainda esta laranja =[ eu fiz o emoteSpells = false mas nao adianta. Eu queria mudar a EXURA VITA, EXURA SAN, XENA MORT. Aque esta as spells, poderia da essa força pf ? local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 145.110, 27) function onCastSpell(cid, var) return doCombat(cid, combat, var) end --------------------------------------------------------------------------------------- local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 15) function onCastSpell(cid, var) return doCombat(cid, combat, var) end ------------------------------------------------------------------------------------- local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 7, 9, 55, 290) function onCastSpell(cid, var) return doCombat(cid, combat, var) end Poderia mudar a cor delas pra mim ?? *-*
-
ADDON PARA VIP
Eu ja conseguir aque amigo, mas msm assim mt obrigado pela assistência !
-
COR DA SPELLS
IAE GALERA DO TK.... QUERIA SABER SE ALGUÉM PODERIA ME AJUDAR A MUDAR A COR DO SPELLS, NORMAL E A COR ''VERDE'' QUERIA QUE SAÍSSE ''AMARELO''. SERA QUEM ALGUEM PODE AJUDAR ?
-
COR DAS POTIONS
Funfou, MUITO OBRIGADO ! *-----------------*
-
COR DAS POTIONS
ALGUEM PODERIA ME AJUDAR A MUDAR A COR DAS POTIONS ? EU JA TENTEI MUDAR VENDO ALGUNS TUTO AQ NO TK, MAS SEMPRE QUANDO MUDO A COR, NA HORA DE USAR A POTION DA DBUG. NAO..NAO DA ERRO DA DISTRO, SOMENTE DEBUG. ALGUEM PODE ME AJUDAR ? Script: local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 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 = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 210}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 1, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 710}, level = 1, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {1980, 1980}, level = 1, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {200, 350}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 210}, level = 1, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {1700, 1700}, level = 1, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {1380, 1380}, mana = {450, 450}, level = 1, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } 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 = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return TRUE end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) 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 local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getCreaturePosition(cid),7) doSendMagicEffect(getCreaturePosition(cid),8) if(not realAnimation) then doCreatureSay(itemEx.uid, "Deliciaa...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return TRUE end doRemoveItem(item.uid, 0) doPlayerAddItem(cid, potion.empty, 0) doPlayerRemoveItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) doPlayerAddItem(cid, potion.empty, getPlayerItemCount(cid, potion.empty)) return TRUE end
-
ADDON PARA VIP
QUERO COLOCAR PRA QUEM FOR VIP TER UMA VANTAGEM DE TER UM ADDON. ALGUEM AJUDA PF ? VIR QUE DA PRA COLOLOCAR POR STORAGE, MAS N SEI COM FAZ. MAS PODE SER POR OUTRA MANEIRA. ALGUEM AJUDA PF ? *------------------*