nbb147 8 Postado Março 16, 2012 Share Postado Março 16, 2012 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. Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/ Compartilhar em outros sites More sharing options...
0 xFkyx 6 Postado Março 18, 2012 Share Postado Março 18, 2012 pra sempre? Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1219353 Compartilhar em outros sites More sharing options...
0 Zmovir 41 Postado Março 18, 2012 Share Postado Março 18, 2012 (editado) @EDIT POSTEI NO TOPICO ERRAOD Editado Março 18, 2012 por Zmovir Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1219358 Compartilhar em outros sites More sharing options...
0 xFkyx 6 Postado Março 18, 2012 Share Postado Março 18, 2012 @UP oq faz o spell? Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1219365 Compartilhar em outros sites More sharing options...
0 Vinc 101 Postado Março 18, 2012 Share Postado Março 18, 2012 (editado) 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, 2012 por lordbug99 Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1219728 Compartilhar em outros sites More sharing options...
0 Zmovir 41 Postado Março 18, 2012 Share Postado Março 18, 2012 mals ai eu postei no topico errado Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1220110 Compartilhar em outros sites More sharing options...
0 pessoa93 217 Postado Março 25, 2012 Share Postado Março 25, 2012 Zmovir, não é a primeira vez que você fica comentendo floods desse tipo. Alertado em 10%. Cuidado amigo. Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1224142 Compartilhar em outros sites More sharing options...
0 nbb147 8 Postado Abril 6, 2012 Autor Share Postado Abril 6, 2012 cara tem como vc mudar pra so uma vocaçao usar? e tambem pra nao gastar dinheiro gastar apenas mana e soul? Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1233354 Compartilhar em outros sites More sharing options...
0 Vinc 101 Postado Abril 6, 2012 Share Postado Abril 6, 2012 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] Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1233434 Compartilhar em outros sites More sharing options...
0 nbb147 8 Postado Abril 7, 2012 Autor Share Postado Abril 7, 2012 mais o efeito onde eu coloco?? Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1233893 Compartilhar em outros sites More sharing options...
0 Vinc 101 Postado Abril 7, 2012 Share Postado Abril 7, 2012 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ó Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1235002 Compartilhar em outros sites More sharing options...
0 nbb147 8 Postado Abril 8, 2012 Autor Share Postado Abril 8, 2012 (editado) 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 8, 2012 por nbb147 Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1235192 Compartilhar em outros sites More sharing options...
0 Vinc 101 Postado Abril 8, 2012 Share Postado Abril 8, 2012 --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 Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1235536 Compartilhar em outros sites More sharing options...
0 nbb147 8 Postado Abril 8, 2012 Autor Share Postado Abril 8, 2012 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>' Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1235817 Compartilhar em outros sites More sharing options...
0 Vinc 101 Postado Abril 8, 2012 Share Postado Abril 8, 2012 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 Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1235906 Compartilhar em outros sites More sharing options...
0 nbb147 8 Postado Abril 8, 2012 Autor Share Postado Abril 8, 2012 ae cara diminuiu o erro olhai: [08/04/2012 17:43:12] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/susanoo.lua) [08/04/2012 17:43:16] data/talkactions/scripts/susanoo.lua:15: ')' expected near 'then' Link para o comentário https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/#findComment-1236009 Compartilhar em outros sites More sharing options...
Pergunta
nbb147 8
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.
Link para o comentário
https://xtibia.com/forum/topic/182596-spell-ou-talkaction-de-invuneravel/Compartilhar em outros sites
17 respostass a esta questão
Posts Recomendados