>Action< Item Up Skills
Vie Sep 09, 2011 3:45 pm
ESTO Lo Que hace Que es DEPENDE de la vocación Que Tenga El recibidor del tema (itemEx / Destino de uso con ...) sí le añadiran X habilidades, Puesto y Ejemplos Creo Qué es Bastante entendible y si no preguntan.
Como ven en sí You can Elegir si heno limite de nivel o no Simplemente Poniendo En El permitir que, verdadera o falsa
aki les traigo un interesante accion lo siguiente que aremos sera:
y en action.xml esto:
Creditos;
XAFTERIN 99%
skanet 1%
Si les gusto rep no sean gachos
Como ven en sí You can Elegir si heno limite de nivel o no Simplemente Poniendo En El permitir que, verdadera o falsa
aki les traigo un interesante accion lo siguiente que aremos sera:
- Código:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
local voc = {
[1] = { -- VOCACION
rlevel = {enable = true, level = 30},--NIVEL REQUERIDO
skills = { --SKILLS QUE AUMENTAN
time = setConditionParam(condition, CONDITION_PARAM_TICKS, 4 * 1000), -- SEGUNDOS
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDING, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_FISHING, 1),
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
}
},
[2] = {
rlevel = {enable = true, level = 30},
skills = {
time = setConditionParam(condition, CONDITION_PARAM_TICKS, 4 * 1000),
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDING, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_FISHING, 1),
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
}
},
[3] = {
rlevel = {enable = true, level = 30},
skills = {
time = setConditionParam(condition, CONDITION_PARAM_TICKS, 4 * 1000),
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_FISHING, 1),
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
}
},
[4] = {
rlevel = {enable = true, level = 30},
skills = {
time = setConditionParam(condition, CONDITION_PARAM_TICKS, 4 * 1000),
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDING, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_FISHING, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, 1),
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, 1)
}
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isCreature(itemEx.uid) or isMonster(itemEx.uid) or isNpc(itemEx.uid) then
return doPlayerSendCancel(cid, "Invalid action.")
end
local v = voc[getPlayerVocation(itemEx.uid)]
if v then
if v.rlevel.enable then
if getPlayerLevel(itemEx.uid) < v.rlevel.level then
return doPlayerSendCancel(cid, "The selected player do not have enough level.")
elseif getPlayerLevel(itemEx.uid) >= v.rlevel.level then
doAddCondition(cid, condition)
doRemoveItem(item.uid)
end
else
doAddCondition(cid, condition)
doRemoveItem(item.uid)
end
else
doPlayerSendCancel(cid, "The selected player do not have required vocation.")
end
return true
end
y en action.xml esto:
- Código:
<action itemid="xxxx" event="script" value="nombredelscrip.lua"/>
Creditos;
XAFTERIN 99%
skanet 1%
Si les gusto rep no sean gachos
- °ஃŠﺕρξŘθஃ°Aportador
- Mensajes : 213
Re: >Action< Item Up Skills
Vie Sep 09, 2011 3:53 pm
explicate donde poner el primero codigo igual me gusto +rep 8/10
Permisos de este foro:
No puedes responder a temas en este foro.