• 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!

Lua Storages MaxMana MaxHp

Majster12

Member
Joined
Feb 20, 2009
Messages
134
Solutions
1
Reaction score
16
Hello!
It's my transform script.
I need little help with storages.
I need to save maxmana and maxhp in storages because when player use transform and die or logout he can transform again and again. Every time script give him mana and hp.
Can somebody edit it for me?
Thanks in advance :)

Code:
function onSay(cid, words, param)
local postac1 = { -- goku
[1] = {1,2,3,4,5,6}, -- Vocation
[2] = {2,56,62,83,8,59}, -- Outfit
[3] = {0,30,50,100,150,200}, -- Level NEED
[4] = {3,3,3,3,3,3}, -- Effect ID
[5] = {1000, 2000, 3000, 4000, 5000, 6000}, -- Additional HP
[6] = {1000, 2000, 3000, 4000, 5000, 6000} -- Additional Mana
}
local postac2 = { --vegeta
[1] = {7,8,9,10,11,12}, -- Vocation
[2] = {70,138,125,284,296,300}, -- Outfit
[3] = {0,30,50,100,150,200}, -- Level NEED
[4] = {3,3,3,3,3,3}, -- Effect ID
[5] = {1000, 2000, 3000, 4000, 5000, 6000}, -- Additional HP
[6] = {1000, 2000, 3000, 4000, 5000, 6000} -- Additional Mana
}
transform(cid, postac1)
transform(cid, postac2)

return true
end
    function transform(cid, parameter)
        for i = 1, #parameter[1] do
            if i >= #parameter[1] then
                elseif getPlayerLevel(cid) < parameter[3][i+1] and getPlayerVocation(cid) == parameter[1][i] then
                        doPlayerSendCancel(cid, "Required level is ".. parameter[3][i+1] .." to transform!")
                elseif getPlayerLevel(cid) >= parameter[3][#parameter[3]] and getPlayerVocation(cid) == parameter[1][#parameter[1]] then
                        doPlayerSendCancel(cid, "Its u last Transform!")
                elseif getPlayerVocation(cid) == parameter[1][i] and getPlayerLevel(cid) >= parameter[3][i+1] then
                        doPlayerSetVocation(cid, parameter[1][i+1])
                        local outfit = {lookType = parameter[2][i+1] , lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
                        doSetCreatureOutfit(cid, outfit, -1)
                        doSendMagicEffect(getCreaturePosition(cid), parameter[4][i+1])
                        doPlayerSendCancel(cid, "Transform Success.")
            setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+parameter[5][i+1])
            setCreatureMaxMana(cid, getCreatureMaxMana(cid)+parameter[6][i+1])
                    return true
                end
            end
        end
 
I'm using a little diffrent system, but if yours sets first vocation after death or logout properly, you can probably do it as it is done in mine. I added some lines to login.lua to set hp and mp at every login, like that:
Code:
local voc = getPlayerVocation(cid)
    local lvl = getPlayerLevel(cid)
   
    if voc == 13 then
    setCreatureMaxHealth(cid, 22*lvl + 150)
    setCreatureMaxMana(cid, 28*lvl)
    end
   
    if voc == 20 then
    setCreatureMaxHealth(cid, 29*lvl + 150)
    setCreatureMaxMana(cid, 21*lvl)
    end
   
    if voc == 30 then
    setCreatureMaxHealth(cid, 22*lvl + 150)
    setCreatureMaxMana(cid, 27*lvl)
    end
 
Yes but it be very slow.
I have about 300 Vocations.
YiPPYji.png
 
The player will always login with first transform, so when you have for example 10 proffesions and every proffesion has 10 transforms, you need to add it only for 10 basic transforms. Only for "TapionR" (262), I hope you got what I mean.
 
Ok i know what you mean.
But i have reborn system on server too.
When Player Reborned 1400lvl and have for example 500 lvl this not work.

if voc == 1 then
setCreatureMaxHealth(cid, lvl*160)
setCreatureMaxMana(cid, lvl*165)
end
 
Well, i don't know how this reborn is scripted, im not using any. Maybe you should do something like that: reborn gives a storage value and in login.lua ask for that value, if it's true then set hp/mp to another values.
Code:
if voc == 1 then
if getPlayerStorageValue(cid, 10000) == 1 then
setCreatureMaxHealth(cid, lvl*160)
setCreatureMaxMana(cid, lvl*165)
else
setCreatureMaxHealth(cid, lvl*60)
setCreatureMaxMana(cid, lvl*65)
end
end
But i don't know, as I said, I have never used reborn system.
 
Reborn.Lua
Code:
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end

function onCreatureAppear(creature)
end

function onCreatureDisappear(cid, pos)
      if focus == cid then
          selfSay('?????.')
          focus = 0
          talk_start = 0
      end
end

function onCreatureTurn(creature)
end

function msgcontains(txt, str)
      return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
      msg = string.lower(msg)
      if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
            selfSay('Hello. If you ready I can "Reborn" you.')
            focus = cid
            talk_start = os.clock()
      elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
          selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.')
      elseif focus == cid then
        talk_start = os.clock()
if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then
                selfSay('Sorry, but you are after reborn.')
            focus = 0
            talk_start = 0
            elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then
                    selfSay('Hehe, I say If you READY. You do not have 250 lvl.')
            elseif msgcontains(msg, 'reborn') then
                    selfSay('Are you sure?')
                                talk_state = 2
--_GOKU_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 1 then
doReborn(cid,1,152,109)
talk_state = 0
--_VEGETA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 7 then
doReborn(cid,1,129,118)
talk_state = 0
--_GOHAN_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 13 then
doReborn(cid,1,147,127)
talk_state = 0
--_TRUNKS_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 19 then
doReborn(cid,1,131,136)
talk_state = 0
--_CELL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 25 then
doReborn(cid,1,127,145)
talk_state = 0
--_FREEZA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 31 then
doReborn(cid,1,9,154)
talk_state = 0
--_UUB_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 37 then
doReborn(cid,1,233,163)
talk_state = 0
--_C17_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 43 then
doReborn(cid,1,100,172)
talk_state = 0
--_C18_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 49 then
doReborn(cid,1,292,181)
talk_state = 0
--_PICOLLO_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 55 then
doReborn(cid,1,262,190)
talk_state = 0
--_DENDE_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 61 then
doReborn(cid,1,225,199)
talk_state = 0
--_TSUFUL_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 67 then
doReborn(cid,1,81,208)
talk_state = 0
--_BARDOCK_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 73 then
doReborn(cid,1,319,217)
talk_state = 0
--_BROLLY_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 79 then
doReborn(cid,1,263,226)
talk_state = 0
--_C16_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 85 then
doReborn(cid,1,301,235)
talk_state = 0
--_COOLER_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 91 then
doReborn(cid,1,242,244)
talk_state = 0
--_JANEMBA_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 97 then
doReborn(cid,1,551,253)
talk_state = 0
--_TAPION_--
elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 103 then
doReborn(cid,1,577,262)
talk_state = 0

elseif msgcontains(msg, 'yes') and talk_state == 2 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert.')


        elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
            selfSay('Good bye.')
            focus = 0
            talk_start = 0
        end
    end
end

function onThink()
    doNpcSetCreatureFocus(focus)
      if (os.clock() - talk_start) > 45 then
          if focus > 0 then
              selfSay('Next Please...')
          end
              focus = 0
      end
    if focus ~= 0 then
        if getDistanceToCreature(focus) > 5 then
            selfSay('Good bye then.')
            focus = 0
        end
    end
end
doReborn Function
Code:
function doReborn(cid, level, looktype, vocation)
    setGlobalStorageValue(1000,getPlayerGUID(cid))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
    db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
    db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
    return TRUE
end

I need to save reborn lvl in database.
Anyone know how to do this?
And after that i can use this script.

Code:
local lvl2 = db.getResult("SELECT ....)
if voc == 1 then
if getPlayerStorageValue(cid,30023) == 4 then
setCreatureMaxHealth(cid, lvl*160+lvl2*160)
setCreatureMaxMana(cid, lvl*165+lvl2*165)
else
setCreatureMaxHealth(cid, lvl*160)
setCreatureMaxMana(cid, lvl*165)
end
end
 
Last edited:
I'm always learning by my mistakes, but now I can't test it. Can't you just set storage value in reborn function that tells at what lvl reborn was done and then check for that value in login.lua? Like this:
Code:
function doReborn(cid, level, looktype, vocation)
setGlobalStorageValue(1000,getPlayerGUID(cid))   --Shouldn't it be 30023 storage?
doCreatureSetStorage(cid, x, level)   --where x is any free storage value
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";")
return TRUE
end

Code:
local lvl2 = getPlayerStorageValue(cid, x)
if voc == 1 then
if getPlayerStorageValue(cid,30023) == 4 then
setCreatureMaxHealth(cid, lvl*160+lvl2*160)
setCreatureMaxMana(cid, lvl*165+lvl2*165)
else
setCreatureMaxHealth(cid, lvl*160)
setCreatureMaxMana(cid, lvl*165)
end
end
 
I made this:

Code:
local lvl2 = getPlayerStorageValue(cid, 95657)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 109 then
if getPlayerStorageValue(cid,30023) == 4 then
setCreatureMaxHealth(cid, getPlayerLevel(cid)*160+lvl2*160)
setCreatureMaxMana(cid, getPlayerLevel(cid)*165+lvl2*165)
if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
setCreatureHealth(cid, getPlayerLevel(cid)*160+lvl2*160)
if getCreatureMana(cid) > getCreatureMaxMana(cid) then
setCreatureMana(cid, getPlayerLevel(cid)*165+lvl2*165)
else
setCreatureMaxHealth(cid, getPlayerLevel(cid)*160)
setCreatureMaxMana(cid, getPlayerLevel(cid)*165)
if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
setCreatureHealth(cid, getPlayerLevel(cid)*160)
if getCreatureMana(cid) > getCreatureMaxMana(cid) then
setCreatureMana(cid, getPlayerLevel(cid)*165)
end
end
Everytime when i use all transforms and relog 2% of current mana and hp decreased.

I use this Transform script.
http://pastebin.com/AxhHRgEe
 
Last edited:
I don't know how your server even started with this, becasue in my opinion it lacks few "ends". I don't know how this could make 2% hp/mp decrease every relog, but here is corrected version:
Code:
local lvl2 = getPlayerStorageValue(cid, 95657)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 109 then
    if getPlayerStorageValue(cid,30023) == 4 then
        setCreatureMaxHealth(cid, getPlayerLevel(cid)*160+lvl2*160)
        setCreatureMaxMana(cid, getPlayerLevel(cid)*165+lvl2*165)
        if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
            setCreatureHealth(cid, getPlayerLevel(cid)*160+lvl2*160)
        end
        if getCreatureMana(cid) > getCreatureMaxMana(cid) then
            setCreatureMana(cid, getPlayerLevel(cid)*165+lvl2*165)
        end
    else
        setCreatureMaxHealth(cid, getPlayerLevel(cid)*160)
        setCreatureMaxMana(cid, getPlayerLevel(cid)*165)
        if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
            setCreatureHealth(cid, getPlayerLevel(cid)*160)
        end
        if getCreatureMana(cid) > getCreatureMaxMana(cid) then
            setCreatureMana(cid, getPlayerLevel(cid)*165)
        end
    end
end

Also your transform script looks odd to me, but I sucks at loops, so can't say if antything is wrong there. I wonder if someone more experienced might have a look into it.
 
Thanks. For corrected version.
It's possible for take gainmana and gainhp from vocations.xml and use it in this script?
Like this?
Code:
local lvl2 = getPlayerStorageValue(cid, 95657)
    if getPlayerStorageValue(cid,30023) == 4 then
        setCreatureMaxHealth(cid, getPlayerLevel(cid)*getPlayerGainhp(cid)+lvl2*getPlayerGainhp(cid))
        setCreatureMaxMana(cid, getPlayerLevel(cid)*getPlayerGainmana(cid)+lvl2*getPlayerGainmana(cid))
        if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
            setCreatureHealth(cid, getPlayerLevel(cid)*160+lvl2*160)
        end
        if getCreatureMana(cid) > getCreatureMaxMana(cid) then
            setCreatureMana(cid, getPlayerLevel(cid)*getPlayerGainmana(cid)+lvl2*getPlayerGainmana(cid))
        end
    else
        setCreatureMaxHealth(cid, getPlayerLevel(cid)*getPlayerGainhp(cid))
        setCreatureMaxMana(cid, getPlayerLevel(cid)*getPlayerGainmana(cid))
        if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
            setCreatureHealth(cid, getPlayerLevel(cid)*getPlayerGainhp(cid))
        end
        if getCreatureMana(cid) > getCreatureMaxMana(cid) then
            setCreatureMana(cid, getPlayerLevel(cid)*getPlayerGainmana(cid))
        end
    end
 
I don't think it's possible, never did something similar to that. But this gaves the same result as mine method.
Code:
local reb = getPlayerStorageValue(cid, 95657)
  if getPlayerStorageValue(cid,30023) == 4 then
  setCreatureMaxHealth(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).healthGain+reb*getVocationInfo(getPlayerVocation(cid)).healthGain)
  setCreatureMaxMana(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).manaGain+reb*getVocationInfo(getPlayerVocation(cid)).manaGain)
  if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
  setCreatureHealth(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).healthGain+reb*getVocationInfo(getPlayerVocation(cid)).healthGain)
  end
  if getCreatureMana(cid) > getCreatureMaxMana(cid) then
  setCreatureMana(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).manaGain+reb*getVocationInfo(getPlayerVocation(cid)).manaGain)
  end
  else
  setCreatureMaxHealth(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).healthGain)
  setCreatureMaxMana(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).manaGain)
  if getCreatureHealth(cid) > getCreatureMaxHealth(cid) then
  setCreatureHealth(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).healthGain)
  end
  if getCreatureMana(cid) > getCreatureMaxMana(cid) then
  setCreatureMana(cid, getPlayerLevel(cid)*getVocationInfo(getPlayerVocation(cid)).manaGain)
  end
  end
Works Perfectly :)
+
in 050-function.lua
Code:
function setCreatureHealth(cid, health)
return (getCreatureMaxHealth(cid) - health) > 0 and doCreatureAddHealth(cid, -(getCreatureMaxHealth(cid) - health)) or true
end

function setCreatureMana(cid, mana)
return (getCreatureMaxMana(cid) - mana) > 0 and doCreatureAddMana(cid, -(getCreatureMaxMana(cid) - mana)) or true
end
 
Last edited:
Well, i guess it's not 300 vocations, it's 300 transforms. For example, he may have 30 vocations, that you can create at lvl 1 and each has 10 transforms. Every transform has own damage and/or spells, so he need 300 vocations. It's dragon ball server :p
 
I am just curios, what you need 300 vocations for? That is a lot :p
Every transform need vocation. :)
Code:
<vocation id="1" name="Goku" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.5" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="8.0" distDamage="8.0" wandDamage="3.0" magDamage="3.5" magHealingDamage="7.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Goku 30lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="15.0" distDamage="15.0" wandDamage="5.0" magDamage="6.5" magHealingDamage="16.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Goku 50lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="22.0" distDamage="22.0" wandDamage="8.0" magDamage="9.0" magHealingDamage="23.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Goku 100lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="29.0" distDamage="29.0" wandDamage="12.0" magDamage="13.5" magHealingDamage="30.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Goku 150lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="37.0" distDamage="37.0" wandDamage="16.0" magDamage="22.5" magHealingDamage="35.5" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Goku 200lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="45.0" distDamage="45.0" wandDamage="20.0" magDamage="25.0" magHealingDamage="42.5" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
 
Every transform need vocation. :)
Code:
<vocation id="1" name="Goku" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.5" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="8.0" distDamage="8.0" wandDamage="3.0" magDamage="3.5" magHealingDamage="7.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Goku 30lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="15.0" distDamage="15.0" wandDamage="5.0" magDamage="6.5" magHealingDamage="16.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Goku 50lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="22.0" distDamage="22.0" wandDamage="8.0" magDamage="9.0" magHealingDamage="23.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Goku 100lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="29.0" distDamage="29.0" wandDamage="12.0" magDamage="13.5" magHealingDamage="30.0" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Goku 150lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="37.0" distDamage="37.0" wandDamage="16.0" magDamage="22.5" magHealingDamage="35.5" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Goku 200lvl" description="a saiyan" needpremium="0" gaincap="70" gainhp="160" gainmana="165" gainhpticks="3.0" gainhpamount="0" gainmanaticks="3" gainmanaamount="0" manamultiplier="1.1" attackspeed="1500" soulmax="100" gainsoulticks="120" fromvoc="1">
<formula meleeDamage="45.0" distDamage="45.0" wandDamage="20.0" magDamage="25.0" magHealingDamage="42.5" defense="1.1" magdefense="1.3" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.0" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>

Oh cool! :)
 
Well, sorry but as I said, i'm bad at loops and this is requied to write script like that. Also without testing by myself it would be very long to make that. You can either use another transfrom system with revert, which I'm using (link down below), or write it by yourself. You can also hope for someone, who would be so nice and make it for you ;p

Here is similar script to what I'm using right now: http://otland.net/threads/transform-system-table-included.199848/
It's very clear for me and works fine. Also it provides transform effect if you know what I mean, and if you don't have it yet.
 
Back
Top