Tudo bem, antes de postar de uma pesquisada no fórum.
Mais pode ficar tranquilo no inicio relevamos muito isso. Até pegar o jeito no forum demora um pouco.
See ya
info
Grupo: Visconde
Registrado: 07/08/11
Posts: 301
Reputação: +70

Tudo bem, antes de postar de uma pesquisada no fórum.
Mais pode ficar tranquilo no inicio relevamos muito isso. Até pegar o jeito no forum demora um pouco.
See ya
info
Grupo: Campones
Registrado: 09/09/12
Posts: 28
Reputação: 0
Char no Tibia: Bluetone Devay

poste a spell por favor assim já posso colocar tudo pronto.
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

function onKill(cid, target) if isMonster(target) and getCreatureName(target) == "BOSS" and getPlayerStorageValue(cid, 63187) < 3 then return setPlayerStorageValue(cid, 63187, 3) and doPlayerSendTextMessage(cid, 27, "Você ganhou 3 cargas para usar a magia.") end end
Aí coloca isso na magia OBS: Na onCastSpell.
if getPlayerStorageValue(cid, 63187) > 0 then setPlayerStorageValue(cid, 63187, getPlayerStorageValue(cid, 63187) == 3 and 2 or getPlayerStorageValue(cid, 63187) == 2 and 1 or getPlayerStorageValue(cid, 63187) == 1 and 0) doPlayerSendTextMessage(cid, 27, "Você usou uma das cargas agora você tem [" .. getPlayerStorageValue(cid, 63187) .. "].") end
PS: Poderia passar sua magia para eu poder colocar certo?
Editado Setembro 12 por Skymagnum
info
Grupo: Campones
Registrado: 09/09/12
Posts: 28
Reputação: 0
Char no Tibia: Bluetone Devay

@
adc skype Elvis.Rullez
....
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.7, -30, -2.0, 0)
local arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 1,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0, 0, 0,0, 0, 0, 0,},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,0, 0, 0, 0,},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
A Magia ta ai !
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

Troca isso
function onCastSpell(cid, var) return doCombat(cid, combat, var) end
por isso
function onCastSpell(cid, var) if getPlayerStorageValue(cid, 63187) > 0 then setPlayerStorageValue(cid, 63187, getPlayerStorageValue(cid, 63187) == 3 and 2 or getPlayerStorageValue(cid, 63187) == 2 and 1 or getPlayerStorageValue(cid, 63187) == 1 and 0) doPlayerSendTextMessage(cid, 27, "Você usou uma das cargas agora você tem [" .. getPlayerStorageValue(cid, 63187) .. "].") return doCombat(cid, combat, var) else doPlayerSendTextMessage(cid, 28, "Você precisa matar o BOSS para usar essa magia.") end end
vai em
/data/creaturescripts/scripts
nome_do_arquivo.lua
function onKill(cid, target) if isMonster(target) and getCreatureName(target) == "BOSS" and getPlayerStorageValue(cid, 63187) < 3 then return setPlayerStorageValue(cid, 63187, 3) and doPlayerSendTextMessage(cid, 27, "Você ganhou 3 cargas para usar a magia.") end end
creaturescripts.xml
<event type="kill" name="KillBossWinSpell" event="script" value="nome_do_arquivo.lua"/>
login.lua
registerCreatureEvent(cid, "KillBossWinSpell")
Editado Setembro 13 por Skymagnum
info
Grupo: Campones
Registrado: 09/09/12
Posts: 28
Reputação: 0
Char no Tibia: Bluetone Devay

@
tipo eu to com um aqui que ta funcionando perfeitamente só que tem um problema tipo eu botei esse script e mas nem um bixo do serve ta morrendo tipo tu mata o bixo ele fica sem life e sem nome só fica o newtype e os bixos continuam attakando :s
na verdade nem player morre mas tipo fica sem a mana e sem o life o nome nem aparece mas só fica o outfit :s ! só falta isso !
ta assim oh function onKill(cid, target)
if getCreatureName(target) == "Diablo" then
setPlayerStorageValue(cid, 63187, 3)
doPlayerSendTextMessage(cid, 27, "Você ganhou 3 cargas para usar a magia.")
end
end
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

function onKill(cid, target) if isMonster(target) and getCreatureName(target) == "Diablo" then setPlayerStorageValue(cid, 63187, 3) doPlayerSendTextMessage(cid, 27, "Você ganhou 3 cargas para usar a magia.") end return true end
se continuar a dar o erro avise
info
Grupo: Campones
Registrado: 09/09/12
Posts: 28
Reputação: 0
Char no Tibia: Bluetone Devay
Eskylo
Deu erro também :s
ai eu tenho um script parecido tipo tu mata o bixo aparece a msg pra todos PLAYER deu o ultimo hit no Boss Gran Tower e recebeu aura full só que tipo fica permanente eu queria por carga vou por o script ake !
local function Teleport(cid)
doSendAnimatedText(getPlayerPosition(cid), "Aaaaah...", TEXTCOLOR_BLUE)
local templo = {x=442, y=549, z=7}
for j = 0, 60 do
starting = {x=839 + j, y=952, z=7, stackpos=253}
for i = 0, 60 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid, templo)
end
end
end
for j = 0, 61 do
starting = {x=1128 + j, y=1120, z=6, stackpos=253}
for i = 0, 6 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
for j = 0, 14 do
starting = {x=1151 + j, y=1115, z=6, stackpos=253}
for i = 0, 5 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
for j = 0, 14 do
starting = {x=1151 + j, y=1127, z=6, stackpos=253}
for i = 0, 5 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
for j = 0, 49 do
starting = {x=1134 + j, y=1120, z=5, stackpos=253}
for i = 0, 6 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
for j = 0, 14 do
starting = {x=1151 + j, y=1115, z=5, stackpos=253}
for i = 0, 5 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
for j = 0, 14 do
starting = {x=1151 + j, y=1127, z=5, stackpos=253}
for i = 0, 5 do
checking={x=starting.x, y=starting.y + i, z=starting.z, stackpos=starting.stackpos}
creature= getThingfromPos(checking)
if isPlayer(creature.uid) == TRUE then
doTeleportThing(creature.uid,templo)
end
end
end
return TRUE
end
function onKill(cid, target, lastHit)
local monstros ={"Gran Tower","gran tower"}
if getCreatureTarget(cid) ~= 0 then
if isMonster(target) == TRUE then
for i = 1, 2 do
nome = getCreatureName(getCreatureTarget(cid))
if (nome == monstros) then
if getPlayerStorageValue(cid, 10007) ~= 1 then
setPlayerStorageValue(cid,10005,1)
setPlayerStorageValue(cid,10002,1)
setPlayerStorageValue(cid,10007,1)
setPlayerStorageValue(cid,10001,1)
doSendMagicEffect(getCreaturePosition(cid), 47)
broadcastMessage("O player ".. getPlayerName(cid) .." derrotou o Boss ".. nome ..", e por isso recebeu Aura Full!", MESSAGE_EVENT_ADVANCE)
end
addEvent(Teleport, 1000, cid)
end
end
end
end
return TRUE
end