Legal =D, pra falar a verdade só li o começo kkkk' seria bem util pra servidores de narutibia e dbz (que na minha opnião não existe nenhum descente ainda, alem do shinobi online ) mais boa REP+
- Fórum
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- Script Transformar Que ganha Hp e Mana.
Script Transformar Que ganha Hp e Mana.
Por Mattziin, 11 de fev. de 2013 em Globalevents e Spells
info
Grupo: Conde
Registrado: 05/10/12
Posts: 589
Reputação: +170
Gênero: Masculino
Char no Tibia: Esqueci.

Legal =D, pra falar a verdade só li o começo kkkk' seria bem util pra servidores de narutibia e dbz (que na minha opnião não existe nenhum descente ainda, alem do shinobi online ) mais boa REP+
Thanks
info
Grupo: Campones
Registrado: 16/01/13
Posts: 11
Reputação: 0
Char no Tibia: Madruga Forever

Legal Rep
Mais Vc Consegue Fazer Uma Q Nao Precisa Mudar Vocation
?
simples, tire a função
doPlayerSetVocation(cid,6)
Editado Fevereiro 14 por Mattziin
aki da o seguinte erro:
[01/04/2013 19:40:54] [Error - Spell Interface]
[01/04/2013 19:40:54] data/spells/scripts/support/Air Form.lua
[01/04/2013 19:40:55] Description:
[01/04/2013 19:40:55] (internalGetPlayerInfo) Player not found when requesting player info #6
[01/04/2013 19:40:57] Reloaded spells.
quando eu uso a spell dese geito pq do seu geito fica pior:
function onCastSpell(cid, var)
end
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 60 then
doPlayerSay(cid, 'Fight Mode!', TALKTYPE_ORANGE_1)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+700)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+400)
doPlayerSetVocation(cid,5)
doSetCreatureOutfit(cid, {lookType=397}, -1)
doSendMagicEffect(getPlayerPosition(cid), 7)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You Cant Transform.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
end
tenta
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 2 then
doPlayerSay(cid, '3', TALKTYPE_ORANGE_1)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+4)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+5)
doPlayerSetVocation(cid,6)
doSetCreatureOutfit(cid, {lookType=7}, -1)
doSendMagicEffect(getPlayerPosition(cid), 8)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "9.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
Editado Abril 13 por Mattziin
tipo eu tenho ela certinho + to com um problema q ta dificil resolver quando o player morre o hp acumula tipo
se ele morrer ou logar antes do tempo da transform o hp acumula será q vc consegue arrumar isso ?
local time = 30 -- quantos segundos vai durar
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 60 then
doCreatureSay(cid, 'Fight Mode!', TALKTYPE_ORANGE_1)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+700)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+400)
doPlayerSetVocation(cid,5)
doSetCreatureOutfit(cid, {lookType=397}, -1)
addEvent(doAddCondition, 1*1000, cid, CONDITION_INFIGHT)
addEvent(setCreatureMaxMana, time*1000, cid, getCreatureMaxMana(cid)-400)
addEvent(setCreatureMaxHealth, time*1000, cid, getCreatureMaxHealth(cid)-700)
addEvent(doPlayerSetVocation, time*1000, cid, 1)
doSendMagicEffect(getPlayerPosition(cid), 7)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You're Transform.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return true
end
end
se conseguir me fala pf
ja criei 3 topicos tentando resolver isso e nenhum scripter conseguiu :S
Blz fiz outro aqui, tenta ai
local tempo = 30 * 1000 -- tempo
local life = 700 -- quanto de life que vai ganhar
local mana = 700 -- quanto de mana que vai ganhar
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTH, life)
setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANA, mana)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 2 then
doPlayerSay(cid, '3', TALKTYPE_ORANGE_1)
doPlayerSetVocation(cid,6)
doSetCreatureOutfit(cid, {lookType=7}, -1)
doSendMagicEffect(getPlayerPosition(cid), 8)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "9.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end





info
Grupo: Artesão
Registrado: 11/11/11
Posts: 115
Reputação: +12
Olá galera , eu vi q muitas pessoas estao atrás de um script de transformar q ganha hp e mana entao decidi criar um e postar aqui.
Tag da spell, bote no spells.xml
Crie um arquivo.lua na pasta script em spells, e bote nome dele de transform.
Copie e cole isso \/ e bote no transform.lua
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 2 then
doPlayerSay(cid, '3', TALKTYPE_ORANGE_1)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+4)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+5)
doPlayerSetVocation(cid,6)
doSetCreatureOutfit(cid, {lookType=7}, -1)
doSendMagicEffect(getPlayerPosition(cid), 8)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "9.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
Siga As Informações
1 -- Vocação q deseja se transformar.
2 -- o lvl q pode se transformar.
3 -- oque a o player vai fala para todo mundo ver.
4 -- quantidade q tu vai ganha de hp.
5 -- quantidade q tu vai ganhar de mana.
6 -- vocação q vai mudar ao transformar.
7 -- o outfit q o player vai ganhar.
8 -- o efeito q irar aparece ao transformar.
9 -- a mensagem q irar aparece se você não tiver nenhum dos requisitos citados.
10 -- o efeito q irar aparece se você não tiver nenhum dos requisitos citados.
Créditos : Euuuu
Editado Fevereiro 11 por Mattziin