• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[8.42.] Pomocy ze skryptem na transformacje.

SakiLegend

New Member
Joined
Dec 29, 2008
Messages
11
Reaction score
0
Wiatjcie, znalazlem skryp na transformacje na pewnym forum, ale skrypt mi nie dziala poprawnie.
W konsoli wywala blad:
[15/06/2009 18:01:42] Lua Script Error: [Spell Interface]
[15/06/2009 18:01:42] data/spells/scripts/healing/transform.luaOnCastSpell

[15/06/2009 18:01:42] luaAddEvent(). Callback parameter should be a function.
a tutaj skrypt:
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
Silnik to Tfs 8.42(0.3.4PL2)
Skrypt powinien zabierac 10 many co 2 sekundy, ale nie zabiera i czy ktos umi to tak przerobic aby outfit po wylogowaniu wracal do 1 outfitu ?
 
Back
Top