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

Super promotion bugg 8.60

rox666

Active Member
Joined
May 19, 2011
Messages
702
Reaction score
26
Location
why would i tell you
Hello, ive got problem with my super brain script.

when someone use "super brain" he get super vocation.
after relog he is at second promotion example elder druid, again.

Could someone help me please.. this is so weird
 
here u go :
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerVocation(cid) == 5 then
		doPlayerSetVocation(cid, 9)
		doCreatureSay(cid, "You are now a Super Sorcerer!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 6 then
		doPlayerSetVocation(cid, 10)
		doCreatureSay(cid, "You are now a Super Druid!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 7 then
		doPlayerSetVocation(cid, 11)
		doCreatureSay(cid, "You are now a Super Paladin!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	elseif getPlayerVocation(cid) == 8 then
		doPlayerSetVocation(cid, 12)
		doCreatureSay(cid, "You are now a Super Knight!", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
	end
end

i got correct in vocations.xml
 
After every:
Lua:
doPlayerSetVocation(cid)

add this:
Lua:
doPlayerSetPromotionLevel(cid,2)
 
Hhmm it seems right :S
I dont know then

Code:
super sorc- fromvoc="5"
super druid- fromvoc="6"
super pala-fromvoc="7"
super knight-fromvoc="8"
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="1">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="2" name="Druid" description="an druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="5" gainmanaticks="4" gainmanaamount="5" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="3">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="4" name="Knight" description="an knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="4">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="5" name="Master Sorcerer" description="a Master Sorcerer" needpremium="1" gaincap="10" gainhp="7" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="6" name="Elder Druid" description="an Elder Druid" needpremium="1" gaincap="10" gainhp="7" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="7" name="Royal Paladin" description="a Royal Paladin" needpremium="1" gaincap="20" gainhp="15" gainmana="25" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="8" name="Elite Knight" description="an Elite Knight" needpremium="1" gaincap="25" gainhp="20" gainmana="7" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="9" name="Super Sorcerer" description="a Super Sorcerer" needpremium="1" gaincap="15" gainhp="9" gainmana="45" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="10" name="Super Druid" description="an Super Druid" needpremium="1" gaincap="15" gainhp="9" gainmana="45" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="11" name="Super Paladin" description="a Super Paladin" needpremium="1" gaincap="25" gainhp="20" gainmana="30" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>	
	<vocation id="12" name="Super Knight" description="an Super Knight" needpremium="1" gaincap="30" gainhp="25" gainmana="9" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="30">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
</vocations>

thats my vocations
 
Please Close the thread, i fixed it self..
for people who get same problem heres the script
Lua:
local setup = {
    --[[
    [0] = { <- vocation ID number
        level = 20, --required minimum level to obtain promotion
        outfit = {lookType=123,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0},
        oldWeapon = 2160, --required weapon to obtain promotion
        newWeapon = 2160, --weapon you get after promotion
        newVocation = 2, --new vocation's ID that the player is promoted to
    },]]
    [5] = { --Master Sorcerer
        level = 20,
        outfit = {lookType=123,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0},
        oldWeapon = 2160,
        newWeapon = 2160,
        newVocation = 9,
        newPromo = 2
    },
    [6] = { --Elder Druid
        level = 20, 
        outfit = {lookType=123,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0},
        oldWeapon = 2160, 
        newWeapon = 2160,
        newVocation = 10,
        newPromo = 2
    },
    [7] = { --Royal Paladin
        level = 20, 
        outfit = {lookType=123,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0},
        oldWeapon = 2160,
        newWeapon = 2160,
        newVocation = 11,
        newPromo = 2
    },
    [8] = { --Elite Knight
        level = 20, 
        outfit = {lookType=123,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0},
        oldWeapon = 2160, 
        newWeapon = 2160,
        newVocation = 12,
        newPromo = 2
    },
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local scroll = setup[getPlayerVocation(cid)]
 
    if not scroll then
        doPlayerSendCancel(cid, 'You do not have the required vocation.')
        return true
    end
 
    if getPlayerLevel(cid) < scroll.level then
        doPlayerSendCancel(cid, 'You need to be at least level '..scroll.level..' in order to be promoted.')
        return true
    end
 
    if getPlayerItemCount(cid, scroll.oldWeapon) == 1 then
        doTransformItem(getPlayerItemById(cid, true, scroll.oldWeapon).uid, scroll.newWeapon)
    else
        doPlayerSendCancel(cid, 'You need only 1 '.. getItemNameById(scroll.oldWeapon)..' in order to be promoted.')
        return true
    end
 
    if scroll.outfit then
        doCreatureChangeOutfit(cid, scroll.outfit)
    end
 
    doRemoveItem(item.uid, 1)
    doPlayerSetPromotionLevel(cid, scroll.newPromo)
    doPlayerSetVocation(cid, scroll.newVocation)
    doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have just been promoted to '..getPlayerVocationName(cid)..'!!')
    doPlayerSave(cid, true)
    return true
end

thanks to people who even tryed to help me !:p
 
Back
Top