Pesquisar na Comunidade
Mostrando resultados para as tags ''urgente rep+''.
Encontrado 1 registro
-
Ajuda Plz Facil Facil Preciso De Alguem Que Configure O Script Do Jeito Que Eu Vou Fala Abaixo Colocar Pra Cada Uma Das 4 Gems Ter Sua Vocação EX: Pedra Rosa = Paladin ! Acho Que Isso Ajuda Coloca Essa Parte >>> vocations = {2, 6}, @Actions : <action itemid="2156; 2153; 2154; 2155" event="script" value="Gems.lua"/> Gems.lua --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function onUse(cid, item, frompos, item2, topos) if (getPlayerStorageValue(cid, 45783) > 0) then return doPlayerSendCancel(cid, "Você já está sob o efeito de uma Magic Gem.") end AtiveGem(cid, item) return true end @CreatureScript <event type="think" name="EffectCheck" event="script" value="checkGEM.lua"/> <event type="login" name="EffectLogin" event="script" value="checkGEM.lua"/> checkGEM.lua --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function onThink(cid) local gemid = getPlayerStorageValue(cid, 71473) if (getPlayerStorageValue(cid, 45783) > 0) and (checkGemTimeFinish(cid, gemid)) then deAtiveGem(cid, gemid) doRemoveCondition(cid, CONDITION_ATTRIBUTES) end return true end function onLogin(cid) local gemid = getPlayerStorageValue(cid, 71473) if (getPlayerStorageValue(cid, 45783) > 0) and (checkGemTimeFinish(cid, gemid)) then deAtiveGem(cid, gemid) end if (gemid > 0) and (not checkGemTimeFinish(cid, gemid)) then local pedra = pedras_add[gemid] if not (pedra) then return true end local skills = pedra.skills doAddCondition(cid, pedras_add_c[gemid]) doPlayerSendTextMessage(cid, 27, "O efeito da gema mágica foi retomado.") doPlayerSetExperienceRate(cid, pedra.xp) registerCreatureEvent(cid, "EffectCheck") sendGemEffect(cid, gemid) end registerCreatureEvent(cid, "EffectDeath") return true end @LIB: --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function getPrefix(val) -- By MaXwEllDeN return (val > 1) and "s" or "" end pedras_add = { [2156] = { -- Pedra Vermelha skills = { [0] = 1, -- Fist Fighting [1] = 1, -- Club Fighting [2] = 1, -- Sword Fighting [3] = 1, -- Axe Fighting [4] = 1, -- Distance Fighting [5] = 1, -- Shielding [6] = 1, -- Magic Level }, xp = 2, -- Ex, 2 x o Xp do serv time = 1, color = {180, 181, 186}, }, [2153] = { -- Pedra Rosa skills = { [0] = 2, -- Fist Fighting [1] = 2, -- Club Fighting [2] = 2, -- Sword Fighting [3] = 2, -- Axe Fighting [4] = 2, -- Distance Fighting [5] = 2, -- Shielding [6] = 2, -- Magic Level }, xp = 3, -- Ex, 2 x o Xp do serv time = 1, color = {183, 184, 185}, }, [2154] = { -- Pedra Amarela skills = { [0] = 3, -- Fist Fighting [1] = 3, -- Club Fighting [2] = 3, -- Sword Fighting [3] = 3, -- Axe Fighting [4] = 3, -- Distance Fighting [5] = 3, -- Shielding [6] = 3, -- Magic Level }, xp = 4, -- Ex, 2 x o Xp do serv time = 1, color = {210, 212, 211}, }, [2155] = { -- Pedra Verde skills = { [0] = 4, -- Fist Fighting [1] = 4, -- Club Fighting [2] = 4, -- Sword Fighting [3] = 4, -- Axe Fighting [4] = 4, -- Distance Fighting [5] = 4, -- Shielding [6] = 4, -- Magic Level }, xp = 5, -- Ex, 2 x o Xp do serv time = 1, color = {26, 30, 31, 32}, }, } pedras_add_c = { [2156] = createConditionObject(CONDITION_ATTRIBUTES), [2153] = createConditionObject(CONDITION_ATTRIBUTES), [2154] = createConditionObject(CONDITION_ATTRIBUTES), [2155] = createConditionObject(CONDITION_ATTRIBUTES), } local conditions = {CONDITION_PARAM_SKILL_FIST, CONDITION_PARAM_SKILL_CLUB, CONDITION_PARAM_SKILL_SWORD,CONDITION_PARAM_SKILL_AXE, CONDITION_PARAM_SKILL_DISTANCE, CONDITION_PARAM_SKILL_SHIELD, CONDITION_PARAM_STAT_MAGICPOINTS} for a, b in pairs(pedras_add_c) do setConditionParam(pedras_add_c[a], CONDITION_PARAM_TICKS, pedras_add[a].time*60*1000) for c = 0, 6 do setConditionParam(pedras_add_c[a], conditions[c + 1], pedras_add[a].skills[c]) end end function sendGemEffect(uid, itemid) if (isCreature(uid)) then local pedra = pedras_add[itemid] local msgs = {"´ . ,", ". ´ ,", "` . ,", ", ` ."} if (getPlayerStorageValue(uid, 45783) > 0) then addEvent(sendGemEffect, 575, uid, itemid) doSendAnimatedText(getThingPos(uid), msgs[math.random(#msgs)], pedra.color[math.random(#pedra.color)]) end end return true end function isGemActivated(cid) return (getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0) and true or false end function checkGemTimeFinish(uid, gemid) local timpo = (getPlayerStorageValue(uid, 45783)-os.time())*(-1) return (timpo >= pedras_add[gemid].time*60) and true or false end function deAtiveGem(uid, gemid) local pedra = pedras_add[gemid] local skills = pedra.skills for a = 0, #skills-1 do doPlayerAddSkill(uid, a, -skills[a]) end doRemoveCondition(uid, pedras_add_c[gemid]) doPlayerSetExperienceRate(uid, 1) setPlayerStorageValue(uid, 45783, -1) setPlayerStorageValue(uid, 71473, -1) doPlayerSendTextMessage(uid, 27, "O efeito da sua gema acabou.") return true end function AtiveGem(uid, item) local pedra = pedras_add[item.itemid] if not (pedra) then return false end local skills = pedra.skills doAddCondition(uid, pedras_add_c[item.itemid]) doPlayerSendTextMessage(uid, 27, "Você está sob o efeito da gema mágica, e o efeito dela durará por ".. pedra.time .. " minuto".. getPrefix(pedra.time) .. ".") setPlayerStorageValue(uid, 71473, item.itemid) setPlayerStorageValue(uid, 45783, os.time()) sendGemEffect(uid, item.itemid) doPlayerSetExperienceRate(uid, pedra.xp) registerCreatureEvent(uid, "EffectCheck") doRemoveItem(item.uid, 1) return true end
- 6 respostas
-
- urgente rep+
- resolvido
-
(e 3 mais)
Tags: