pra sempre?
@EDIT POSTEI NO TOPICO ERRAOD
Editado Março 18 por Zmovir
@UP
oq faz o spell?
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

bom pelo que eu vi o script do zmovir n dexa ivunerave,então vo posta o meu
va em creaturescript/script crie um arquivo lua renomeio para imoratl.lua e cole isto dentro
---config
storage = 757575 --caso formuda o storage mude na talkaction tbm
st = 76765 --storage de time
players = true --ivuneravel a attacks de players true or false
creature = true --ivurenavel a attack de monstros true or false
function onStatsChange(cid, attacker, type, combat, value)
if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, st) >= os.time then
if type == STATSCHANGE_HEALTHLOSS then
if players == true and isPlayer(attacker) then
return false
end
if creature == true and not isPlayer(attacker) then
return false
end
else
return true
end
end
end
feche, abra login.lua e coloque antes do ultimo end
registerCreatureEvent(cid, "imortal")
va em creaturescript.xml e coloque esta tag
<event type="statschange" name="imortal" event="script" value="imortal.lua"/>
agora vá em talkaction/script crie um arquivo lua nomeio imortal.lua e cole isto dentro(confugure comforme o que se quiser)
--config storage = 75757 -- storage, se for mudar mude no creaturescript tbm storagetime = 76765 --storage de tempo lv = 1 --level nessesario para usar money = 0 --dinheiro que gasta ao usar mana = 0 --mana gasta ao usar t = false --tem tempo de duração ture or false time = 10 --tempo que dura em minutos,caso acima estaja como true function onSay(cid, words, param, channel) value = time* 1000*60+os.time() if string.lower(param) == "on" or param == "" then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then doPlayerSendTextMessage(cid, 1, "voce ja esta ivuneravel") return true end if getPlayerLevel >= lv then if doPlayerRemoveMoney(cid, money) then if getCreatureMana(cid) >= mana and doCreatureAddMana(cid, mana) then if t == true then setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(cid, storagetime, value) else setPlayerStorageValue(cid, storage, 1) end else doPlayerSendTextMessage(cid, 1, "voce n tem mana suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem dinheiro o suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem level suficiente") end elseif strig.lower(param) == "off" then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then setPlayerStorageVlaue(cid, storage, 0) return true else doPlayerSendTextMessage(cid, 1, "voce n esta com ivunerabilidade ativada") end else doPlayerSendTextMessage(cid, 1, "parametro incorreto,os parametros validos são on e off") end return TRUE end
se n funcionar ou quiser alguma alteração é so fala
--edit--
post avia bugado,se copio antes,copie novamente
Editado Março 18 por lordbug99
mals ai eu postei no topico errado
info
Grupo: Conde
Registrado: 20/10/10
Posts: 911
Reputação: +217
Char no Tibia: Felipe Pessoa

Zmovir, não é a primeira vez que você fica comentendo floods desse tipo.
Alertado em 10%.
Cuidado amigo.
info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado

cara tem como vc mudar pra so uma vocaçao usar? e tambem pra nao gastar dinheiro gastar apenas mana e soul?
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

pra n gastar dinheiro é so deixar 0(zero),pra vocs aki
--config
storage = 75757 -- storage, se for mudar mude no creaturescript tbm
storagetime = 76765 --storage de tempo
lv = 1 --level nessesario para usar
money = 0 --dinheiro que gasta ao usar
mana = 0 --mana gasta ao usar
t = false --tem tempo de duração ture or false
time = 10 --tempo que dura em minutos,caso acima estaja como true
vocs = {1, 2, 5, 6 } --vocs que usam(no caso mages)
function onSay(cid, words, param, channel)
value = time* 1000*60+os.time()
if string.lower(param) == "on" or param == "" then
if isInArray(vocs, getPlayerVocation(cid) ) then
if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then
doPlayerSendTextMessage(cid, 1, "voce ja esta ivuneravel")
return true
end
if getPlayerLevel >= lv then
if getPlayerMoney(cid) >= money or money <= 0 then
if getCreatureMana(cid) >= mana and doCreatureAddMana(cid, mana) or mana <= 0 then
if t == true then
setPlayerStorageValue(cid, storage, 2)
setPlayerStorageValue(cid, storagetime, value)
doPlayerRemoveMoney(cid, money)
else
setPlayerStorageValue(cid, storage, 1)
doPlayerRemoveMoney(cid, money)
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem mana suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem dinheiro o suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem level suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "sua vocação n pode usar essa magia")
end
elseif strig.lower(param) == "off" then
if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then
setPlayerStorageVlaue(cid, storage, 0)
return true
else
doPlayerSendTextMessage(cid, 1, "voce n esta com ivunerabilidade ativada")
end
else
doPlayerSendTextMessage(cid, 1, "parametro incorreto,os parametros validos são on e off")
end
return TRUE
end
[/spoiker]
info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado

mais o efeito onde eu coloco??
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

vish nem coloquei mais facinho
--config
storage = 75757-- storage, se for mudar mude no creaturescript tbm
storagetime = 76765 --storage de tempo lv = 1 --level nessesario para usar
money = 0 --dinheiro que gasta ao usar
mana = 0 --mana gasta ao usar
t = false --tem tempo de duração ture or false
time = 10 --tempo que dura em minutos,caso acima estaja como true
vocs = {1, 2, 5, 6 } --vocs que usam(no caso mages)
type = 33 --efeito
function onSay(cid, words, param, channel)
pos = getPlayerPosition(cid)
value = time* 1000*60+os.time()
if string.lower(param) == "on" or param == "" then
if isInArray(vocs, getPlayerVocation(cid) )
then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then doPlayerSendTextMessage(cid, 1, "voce ja esta ivuneravel")
return true
end
if getPlayerLevel >= lv then if getPlayerMoney(cid) >= money or money <= 0 then
if getCreatureMana(cid) >= mana and doCreatureAddMana(cid, mana) or mana <= 0 then
if t == true then
setPlayerStorageValue(cid, storage, 2)
setPlayerStorageValue(cid, storagetime, value)
doPlayerRemoveMoney(cid, money)
doSendMagicEffect(pos, type)
else
doSendMagicEffect(pos, type)
setPlayerStorageValue(cid, storage, 1)
doPlayerRemoveMoney(cid, money)
doSendMagicEffect(pos, type)
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem mana suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem dinheiro o suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "voce n tem level suficiente")
end
else
doPlayerSendTextMessage(cid, 1, "sua vocação n pode usar essa magia")
end
elseif strig.lower(param) == "off" then
if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then setPlayerStorageVlaue(cid, storage, 0)
return true
else doPlayerSendTextMessage(cid, 1, "voce n esta com ivunerabilidade ativada")
end
else
doPlayerSendTextMessage(cid, 1, "parametro incorreto,os parametros validos são on e off")
end
return TRUE
end
se quise um efeito que fique soltando sempara até acaba so fala que eu faço,mais por hoje é só
info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado

ae cara deu uns erros:
[07/04/2012 23:18:02] luaAddOutfitCondition(). Condition not found
[07/04/2012 23:18:16] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/susanoo.lua)
[07/04/2012 23:18:19] data/talkactions/scripts/susanoo.lua:16: ')' expected near 'then'
[07/04/2012 23:18:27] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/efect.lua)
[07/04/2012 23:18:30] data/creaturescripts/scripts/efect.lua:21: 'end' expected (to close 'function' at line 4) near '<eof>'
[07/04/2012 23:18:35] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/susanoo.lua)
[07/04/2012 23:18:39] data/creaturescripts/scripts/susanoo.lua:9: ')' expected near 'then'
sim mais uma coisa eu queria saber se e pra colocar a parte do creaturescript.
Editado Abril 7 por nbb147
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

--config storage = 75757 -- storage, se for mudar mude no creaturescript tbm storagetime = 76765 --storage de tempo lv = 1 --level nessesario para usar money = 0 --dinheiro que gasta ao usar mana = 0 --mana gasta ao usar t = false --tem tempo de duração ture or false time = 10 --tempo que dura em minutos,caso acima estaja como true type = 35 --efeito function onSay(cid, words, param, channel) value = time* 1000*60+os.time() pos = getCreaturerPos(cid) if string.lower(param) == "on" or param == "" then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then doPlayerSendTextMessage(cid, 1, "voce ja esta ivuneravel") return true end if getPlayerLevel >= lv then if doPlayerRemoveMoney(cid, money) then if getCreatureMana(cid) >= mana and doCreatureAddMana(cid, mana) then if t == true then setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(cid, storagetime, value) doSendMagicEffect(pos, type) else setPlayerStorageValue(cid, storage, 1) doSendMagicEffect(pos, type) end else doPlayerSendTextMessage(cid, 1, "voce n tem mana suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem dinheiro o suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem level suficiente") end elseif strig.lower(param) == "off" then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then setPlayerStorageVlaue(cid, storage, 0) return true else doPlayerSendTextMessage(cid, 1, "voce n esta com ivunerabilidade ativada") end else doPlayerSendTextMessage(cid, 1, "parametro incorreto,os parametros validos são on e off") end return TRUE end
info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado

ta dando erro :
[08/04/2012 15:02:05] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/susanoo.lua)
[08/04/2012 15:02:08] data/talkactions/scripts/susanoo.lua:15: ')' expected near 'then'
[08/04/2012 15:02:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/efect.lua)
[08/04/2012 15:02:17] data/creaturescripts/scripts/efect.lua:21: 'end' expected (to close 'function' at line 4) near '<eof>'
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

tenta assim, n achei o erro mais modfiquei uma linha
--config storage = 75757 -- storage, se for mudar mude no creaturescript tbm storagetime = 76765 --storage de tempo lv = 1 --level nessesario para usar money = 0 --dinheiro que gasta ao usar mana = 0 --mana gasta ao usar t = false --tem tempo de duração ture or false time = 10 --tempo que dura em minutos,caso acima estaja como true type = 35 --efeito function onSay(cid, words, param, channel) value = time* 1000*60+os.time() pos = getCreaturerPos(cid) if param == "on" or param == " " then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then doPlayerSendTextMessage(cid, 1, "voce ja esta ivuneravel") return true end if getPlayerLevel >= lv then if doPlayerRemoveMoney(cid, money) then if getCreatureMana(cid) >= mana and doCreatureAddMana(cid, mana) then if t == true then setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(cid, storagetime, value) doSendMagicEffect(pos, type) else setPlayerStorageValue(cid, storage, 1) doSendMagicEffect(pos, type) end else doPlayerSendTextMessage(cid, 1, "voce n tem mana suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem dinheiro o suficiente") end else doPlayerSendTextMessage(cid, 1, "voce n tem level suficiente") end elseif strig.lower(param) == "off" then if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, storagetime) >= os.time then setPlayerStorageVlaue(cid, storage, 0) return true else doPlayerSendTextMessage(cid, 1, "voce n esta com ivunerabilidade ativada") end else doPlayerSendTextMessage(cid, 1, "parametro incorreto,os parametros validos são on e off") end return TRUE end
o outro(creaturescript) tava faltamdo um end uhsauhsasauhsau
---config storage = 757575 --caso formuda o storage mude na talkaction tbm st = 76765 --storage de time players = true --ivuneravel a attacks de players true or false creature = true --ivurenavel a attack de monstros true or false function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, storage) == 1 or (getPlayerStorageValue(cid, storage) == 2 and getPlayerStorageValue(cid, st) >= os.time then if type == STATSCHANGE_HEALTHLOSS then if players == true and isPlayer(attacker) then return false end if creature == true and not isPlayer(attacker) then return false end else return true end end end end




info
Grupo: Visconde
Registrado: 06/04/11
Posts: 350
Reputação: +8
Char no Tibia: Mulekepirado
Tipo do script: spell ou talkaction
Protocolo (versão do Tibia): 850
Servidor utilizado: tfs
Nível de experiência: mediano
Adicionais/Informações: como o nome ja diz eu quero que deer vunerabilidade ao player que usar, quando o player disser vunerable e fica invuneravel a qualquer tipow de dano.