post ae as id das vocaçoes ae.
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [Promotion] Ajuda Spells + Promotion
[Promotion] Ajuda Spells + Promotion
Por daaniel13, 05 de set. de 2011 em Actions e Talkactions
info
Grupo: Artesão
Registrado: 30/12/07
Posts: 132
Reputação: +5
Gênero: Masculino
Char no Tibia: Hannibol

info
Grupo: Visconde
Registrado: 23/11/10
Posts: 272
Reputação: +37
Char no Tibia: N tenho

posta os ids das vocação, a magia completa com script e tudo,me fala a versão do seu ot etc..
OLá. Respondendo akee..
1° Magia Master Arcangel VOCATION ID: 9
local water = {490, 491, 492, 493}
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, 36)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.0, -30, -10.0, 4)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 5000)
setConditionFormula(stun, -0.8, 0, -0.9, 0)
setCombatCondition(meteor, stun)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.0, -30, -10.0, 4)
combat_arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local combat_area = createCombatArea(combat_arr)
setCombatArea(combat, combat_area)
local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end
local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end
function onTargetTile(cid, pos)
if (math.random(0, 0) == 0) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_FIRE)
addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_FIRE)
addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
2º Magia Para Mystic Druid VOCATION ID: 10
local water = {490, 491, 492, 493}
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, 43)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.0, -30, -10.0, 4)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 5000)
setConditionFormula(stun, -0.8, 0, -0.9, 0)
setCombatCondition(meteor, stun)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.0, -30, -10.0, 4)
combat_arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local combat_area = createCombatArea(combat_arr)
setCombatArea(combat, combat_area)
local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end
local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end
function onTargetTile(cid, pos)
if (math.random(0, 0) == 0) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_ICE)
addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_ICE)
addEvent(meteorCast, 200, {cid = cid,pos = pos, combat = meteor})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
3º Magia Para Legendary Knight VOCATION ID: 12
local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA_RED)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, TRUE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.6, -200, 1.2, -190)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)
local condition = createConditionObject(CONDITION_PHYSICAL)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 100, 5, -100)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Xml das Magias!!!
Magia Referente a Sequencia a Cima
1º
<instant name="exori mas flam" words="exori mas flam" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Fogo do ceu.lua"><vocation id="9"/>
</instant>
2º
<instant name="exori mas frigo" words="exori mas frigo" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Gelo do ceu.lua"><vocation id="10"/>
</instant>
3º
<instant name="Red Spark" words="exori bleed" lvl="100" mana="460" prem="1" exhaustion="1200" needlearn="0" script="Magia Vip/redspark.lua"><vocation id="12"/>
</instant>
Bom é isso Pessoal Espero que me Ajudemm...
Versao do meu Ot é 8.60
Obrigadoo Me ajudando = +REP
posta os ids das vocação, a magia completa com script e tudo,me fala a versão do seu ot etc..
Oláa Respondito o Topico Com As coisas que me pidir.. Das Voc Obrigado
Ola amigo tudo bem? Percebi o que tem de errado e vou até deixar em negrito seu erro
<instant name="exori mas frigo" words="exori mas frigo" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Gelo do ceu.lua">
<vocation name="6"/>
</instant>
<instant name="exori mas flam" words="exori mas flam" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Fogo do ceu.lua">
<vocation name="9"/>
</instant>
<instant name="Red Spark" words="exori bleed" lvl="100" mana="460" prem="1" exhaustion="1200" needlearn="0" script="Magia Vip/redspark.lua">
<vocation name="12"/>
</instant>
Portanto é so mudar para:
<instant name="exori mas frigo" words="exori mas frigo" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Gelo do ceu.lua">
<vocation id="6"/>
</instant>
<instant name="exori mas flam" words="exori mas flam" lvl="100" mana="500" prem="1" range="7" needtarget="1" blockwalls="1" exhaustion="1200" needlearn="0" event="script" value="Magia Vip/Fogo do ceu.lua">
<vocation id="9"/>
</instant>
<instant name="Red Spark" words="exori bleed" lvl="100" mana="460" prem="1" exhaustion="1200" needlearn="0" script="Magia Vip/redspark.lua">
<vocation id="12"/>
</instant>
Entendeu? ou coloca o nome da vocação no primeiro!!!
desejo rep + pq eu percebi! XD
Abraços
Opaaa.. Deu Certo Ake Cara.
Mais Tenhu uma OUtra Duvida...
MEu Npc que Vende Promotion Vip. Acontece o seguinte.
Quando o PLayer "Elite Knight" Compra vira Legendary KNight, Quando ele LOga Sai o Jogo e Volta.. ele volta a Promotion Antiga,,"Elite Knight"
Alguem pode me ajudar..
me Ajudem,mm
Npc Promotion Vip .XMl
<?xml version="1.0" encoding="UTF-8"?><npc name="promotion vip" script="data/npc/scripts/promotion vip.lua" walkinterval="2000">
<health now="100" max="100"/>
<look type="302" head="78" body="68" legs="39" feet="76" addons="0"/>
<parameters>
<parameter key="message_greet" value="Ola |PLAYERNAME|. Eu vendo Promotion VIp. Diga Second Promote"/>
</parameters>
</npc>
Script Npc Promotion Vip.xml
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 onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local talkState = {}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
price = 500000
if msgcontains(msg, "second promote") then
selfSay("Olá você quer ser promovido por '.. 50000k ..' diga {yes} por favor.", cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, "yes") and talkState[talkUser] == 1)then
if doPlayerRemoveMoney(cid, price) == TRUE then
if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
selfSay('Parabens você foi promovido!', cid)
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
else
selfSay('Você já foi promovido', cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
else
selfSay('You don\'t have '.. price ..'', cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
elseif msg == "no" and talkState[talkUser] == 1 then
selfSay("Then not", cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Alguem me AJuda..
Quem resolveu meu problema da magia ganhou rep..
Quem resolver esse ganha mais REp
Obrigado
Editado Setembro 7 por daaniel13
Opa depois de um tempo retired estou de volta no xtibia para ajudar com oq eu puder
falando nisso...
ta ai
testa e ve se agora funciona
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 onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local talkState = {}
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
price = 500000
if msgcontains(msg, "second promote") then
selfSay("Olá você quer ser promovido por '.. 50000k ..' diga {yes} por favor.", cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, "yes") and talkState[talkUser] == 1)then
if doPlayerRemoveMoney(cid, price) == TRUE then
if(isInArray({5, 6, 7, 8}, getPlayerVocation(cid))) then
selfSay('Parabens você foi promovido!', cid)
doPlayerSetPromotionLevel(cid, 2)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
else
selfSay('Você já foi promovido', cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
else
selfSay('You don\'t have '.. price ..'', cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
elseif msg == "no" and talkState[talkUser] == 1 then
selfSay("Then not", cid)
talkState[talkUser] = 0
npcHandler:releaseFocus(cid)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())





info
Grupo: Campones
Registrado: 01/08/10
Posts: 14
Reputação: +1
OLá.
Gostaria de uma ajuda akee.
Tenhu Promotion Vip tudo certinho..
mais é o seguinte fiz 3 magias novas.
Para Druid, Sorcerer, e Knight.
Porem os Elite Usa Normal..
Sendo que lá no epsll as magias estao com a ID das NOvas Vocação que Seria
(9,10,11,12)
Vou postar a Parte que esta a magia!!!
Ake Estao as tres magias Novas.
e tipo mais uma duvida..
Sera que quando a Vip acabar.. ele vai parar de acessar a Area vip, e apromotion SAir ???
POste ake qual script vc quer quer que eu POsto Akee. Obrigado.
Editado Setembro 5 por daaniel13