Dblegend
Active User
- Joined
- Aug 12, 2008
- Messages
- 133
- Reaction score
- 1
Witam.
Mam Skryp transform http://tibia.net.pl/spells/90781-hit-skrypt-na-transform-i-revert.html z funkcjami przerobionymi pod 8.42 prze zemnie, ale cos mi z funkcja luaAddEvcent nie dziala (nie przerabialem, moze stara funkcja).
W silniku wywala blad:
Bede wdzieczny za pomoc i dam reputka.
PoZdro
Ps. Skrypt powinien zabierac mane ale tego nie robi ;/
Mam Skryp transform http://tibia.net.pl/spells/90781-hit-skrypt-na-transform-i-revert.html z funkcjami przerobionymi pod 8.42 prze zemnie, ale cos mi z funkcja luaAddEvcent nie dziala (nie przerabialem, moze stara funkcja).
W silniku wywala blad:
A to skryp troche przerobiony przezemnie:[15/06/2009 18:01:42] Lua Script Error: [Spell Interface]
[15/06/2009 18:01:42] data/spells/scripts/healing/transform.luanCastSpell
[15/06/2009 18:01:42] luaAddEvent(). Callback parameter should be a function.
Code:
second = 2 -- co ile ma sekund spadac ki
function goku(cid) ---Nie ruszac
if isPlayer(cid) == 1 then ---nie ruszac
if getPlayerVocation(cid) == 0 then ---nie ruszac
if getPlayerMana(cid) >= 100 then ---ile many na transforma
doPlayerAddMana(cid,-10)
goku = addEvent(goku,1000,cid)
end
end
if getPlayerMana(cid) <= 100 then ---je?li player ma many
stopEvent(goku)
setCreatureMaxHealth(cid, -500)
setCreatureMaxMana(cid, -100)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function goku1(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 1 then
if getPlayerMana(cid) >= 100 then
doPlayerAddMana(cid,-10)
goku1 = addEvent(goku1,1000,cid)
end
end
if getPlayerMana(cid) <= 100 then
stopEvent(goku1)
setCreatureMaxHealth(cid, -500)
doPlayerAddManaMax(cid,-400)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function goku2(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 2 then
if getPlayerMana(cid) >= 100 then
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerAddMana(cid,-10)
goku2 = addEvent(goku2,1000,cid)
end
end
if getPlayerMana(cid) <= 100 then
stopEvent(goku2)
setCreatureMaxHealth(cid, -500)
doPlayerAddManaMax(cid,-800)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function goku3(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then
if getPlayerMana(cid) >= 100 then
doSendMagicEffect(getCreaturePosition(cid), 14)
doPlayerAddMana(cid,-10)
doSendMagicEffect(getCreaturePosition(cid), 14)
goku3 = addEvent(goku3,1000,cid)
end
end
if getPlayerMana(cid) <= 100 then
stopEvent(goku3)
setCreatureMaxHealth(cid, -500)
setCreatureMaxMana(cid, 500)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function goku4(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then
if getPlayerMana(cid) >= 100 then
doSendMagicEffect(getCreaturePosition(cid), 181)
doPlayerAddMana(cid,-10)
goku4 = addEvent(goku4,second*1000,cid)
end
end
if getPlayerMana(cid) <= 100 then
stopEvent(goku4)
setCreatureMaxHealth(cid, -500)
setCreatureMaxMana(cid, 500)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function goku5(cid)
if isPlayer(cid) == 1 then
if getPlayerVocation(cid) == 3 then
if getPlayerMana(cid) >= 100 then
doSendMagicEffect(getCreaturePosition(cid), 180)
doPlayerAddMana(cid,-10)
goku5 = addEvent(goku5,second*1000,cid)
end
end
if getPlayerMana(cid) <= 100 then
stopEvent(goku5)
setCreatureMaxHealth(cid, -500)
setCreatureMaxMana(cid, 500)
doPlayerSetVocation(cid,0)
doRemoveCondition(cid, 6)
end
end
end
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 5 then ---je?li profa gracza
if getPlayerLevel(cid) >= 250 then ----je?li level gracza
doPlayerSetVocation(cid,6) ---ustawianie profy gracza
doCreatureChangeOutfit(cid, {lookType=66}) ---Wygl?d gracza
doSendMagicEffect(getCreaturePosition(cid), 60) ---Efekt przy transie
setCreatureMaxHealth(cid, 500)
setCreatureMaxMana(cid, 500)
goku5 = addEvent(goku5,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 250 lvl.") ---napis,je?li si? nie ma LV
end
end
if getPlayerVocation(cid) == 4 then
if getPlayerLevel(cid) >= 170 then
doPlayerSetVocation(cid,5)
doCreatureChangeOutfit(cid, {lookType=46})
setCreatureMaxHealth(cid, 500)
setCreatureMaxMana(cid, 500)
goku4 = addEvent(goku4,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 170 lvl.")
end
end
if getPlayerVocation(cid) == 3 then
if getPlayerLevel(cid) >= 170 then
doPlayerSetVocation(cid,4)
doCreatureChangeOutfit(cid, {lookType=70})
doSendMagicEffect(getCreaturePosition(cid), 59)
setCreatureMaxHealth(cid, 200)
setCreatureMaxMana(cid, 500)
goku3 = addEvent(goku3,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 170 lvl.")
end
end
if getPlayerVocation(cid) == 2 then
if getPlayerLevel(cid) >= 140 then
doPlayerSetVocation(cid,3)
doCreatureChangeOutfit(cid, {lookType=71})
doSendMagicEffect(getCreaturePosition(cid), 58)
setCreatureMaxHealth(cid, 1200)
setCreatureMaxMana(cid, 100)
goku2 = addEvent(goku2,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 140 lvl.")
end
end
if getPlayerVocation(cid) == 1 then
if getPlayerLevel(cid) >= 80 then
doPlayerSetVocation(cid,2)
doCreatureChangeOutfit(cid, {lookType=18})
doSendMagicEffect(getCreaturePosition(cid), 57)
setCreatureMaxHealth(cid, 800)
setCreatureMaxMana(cid, 600)
goku1 = addEvent(goku1,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 80 lvl.")
end
end
if getPlayerVocation(cid) == 0 then
if getPlayerLevel(cid) >= 40 then
doPlayerSetVocation(cid,1)
doCreatureChangeOutfit(cid, {lookType=37})
doSendMagicEffect(getCreaturePosition(cid), 56)
setCreatureMaxHealth(cid, 500)
setCreatureMaxMana(cid, 500)
goku = addEvent(goku,second*1000,cid)
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "sorry you don't 40 lvl.")
end
end
end
PoZdro
Ps. Skrypt powinien zabierac mane ale tego nie robi ;/