D
Deleted member 49793
Guest
So basicly my script changes there voc +5 vocation ids, but for some reason it works for everyone cept 2 vocations, barbarian and Wizard (id 1 and 4) for them when they relog after being promoted they suddenly toggle +5 ids again. Not sure why...
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="Wizard" description="a wizard" needpremium="0" gaincap="10"
gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" 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="1.3" sword="2.0" axe="2.0" distance="2.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="2" name="Paladin" description="a paladin" needpremium="0" gaincap="25"
gainhp="15" gainmana="10" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" 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.3" sword="1.4" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="3" name="Voodoomaster" description="a voodoomaster" needpremium="0"
gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.1" 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.5" club="1.3" sword="2.0" axe="2.0" distance="2.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="4" name="Barbarian" description="a barbarian" needpremium="0"
gaincap="25" gainhp="10" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6"
gainmanaamount="10" 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.3" sword="1.1" axe="1.1" distance="1.4"
shielding="1.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="5" name="Rangerr" description="a ranger" needpremium="0" gaincap="15"
gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="5">
<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.3" sword="2.0" axe="2.0" distance="1.8"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="6" name="Wizard of Zeus" description="a wizard of zeus" needpremium="0"
gaincap="10" gainhp="6" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" 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="7" name="Paladin of Zeus" description="a paladin of zeus" needpremium="0"
gaincap="25" gainhp="18" gainmana="10" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" 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.2" sword="1.2" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Voodoomaster of Zeus" description="a voodoomaster of zeus"
needpremium="0" gaincap="12" gainhp="6" gainmana="30" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" 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.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="9" name="Barbarian of Zeus" description="a barbarian of zeus" needpremium="0"
gaincap="25" gainhp="12" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6"
gainmanaamount="10" 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.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Ranger of Zeuss" description="a ranger" needpremium="0"
gaincap="15" gainhp="6" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="31">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Wizard of Apollo" description="a wizard of apollo" needpremium="0"
gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="6">
<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="12" name="Paladin of Apollo" description="a paladin of apollo" needpremium="0"
gaincap="25" gainhp="15" gainmana="10" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="7">
<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.2" sword="1.2" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="13" name="Voodoomaster of Apollo" description="a voodoomaster of apollo"
needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="8">
<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="14" name="Barbarian of Apollo" description="a barbarian of apollo"
needpremium="0" gaincap="25" gainhp="10" gainmana="5" gainhpticks="3" gainhpamount="5"
gainmanaticks="6" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="9">
<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.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="15" name="Ranger of Apollos" description="a ranger" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="10">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="16" name="Wizard of Poseidon" description="a wizard of Poseidon"
needpremium="0" gaincap="10" gainhp="5" gainmana="36" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="11">
<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="17" name="Paladin of Poseidon" description="a paladin of Poseidon" needpremium="0"
gaincap="25" gainhp="15" gainmana="12" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="12">
<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.2" sword="1.2" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="18" name="Voodoomaster of Poseidon" description="a voodoomaster of Poseidon"
needpremium="0" gaincap="10" gainhp="5" gainmana="36" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="13">
<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="19" name="Barbarian of Poseidon" description="a barbarian of Poseidon"
needpremium="0" gaincap="25" gainhp="10" gainmana="6" gainhpticks="3" gainhpamount="5"
gainmanaticks="6" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="14">
<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.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="20" name="Ranger of Poseidonn" description="a ranger" needpremium="0"
gaincap="15" gainhp="5" gainmana="6" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="15">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="21" name="Wizard of Chronos" description="a wizard of Chronos"
needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1800" soulmax="100"
gainsoulticks="120" fromvoc="16">
<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="22" name="Paladin of Chronos" description="a paladin of Chronos" needpremium="0"
gaincap="25" gainhp="15" gainmana="10" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" attackspeed="1800" soulmax="100" gainsoulticks="120"
fromvoc="17">
<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.2" sword="1.2" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="23" name="Voodoomaster of Chronos" description="a voodoomaster of Chronos"
needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="1800" soulmax="100"
gainsoulticks="120" fromvoc="18">
<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="24" name="Barbarian of Chronos" description="a barbarian of Chronos"
needpremium="0" gaincap="25" gainhp="10" gainmana="5" gainhpticks="3" gainhpamount="5"
gainmanaticks="6" gainmanaamount="10" manamultiplier="3.0" attackspeed="1800" soulmax="100"
gainsoulticks="120" fromvoc="19">
<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.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="25" name="Ranger of Chronoss" description="a ranger" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="1800" soulmax="100" gainsoulticks="120"
fromvoc="20">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="26" name="Wizard of Hades" description="a wizard of Hades" needpremium="0"
gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="21">
<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="27" name="Paladin of Hades" description="a paladin of Hades" needpremium="0"
gaincap="25" gainhp="15" gainmana="10" gainhpticks="6" gainhpamount="5" gainmanaticks="3"
gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="22">
<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.2" sword="1.2" axe="1.2" distance="1.8"
shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="28" name="Voodoomaster of Hades" description="a voodoomaster of Hades"
needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5"
gainmanaticks="3" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100"
gainsoulticks="120" fromvoc="23">
<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="29" name="Barbarian of Hades" description="a barbarian of Hades" needpremium="0"
gaincap="25" gainhp="10" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6"
gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="24">
<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.4" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="30" name="Rangerr of Hades" description="a ranger" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="25">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="31" name="Ranger" description="a ranger" needpremium="0" gaincap="15"
gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="31">
<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.3" sword="2.0" axe="2.0" distance="1.1"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="56" name="Ranger of Hades" description="a ranger of Hades" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="51">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="51" name="Ranger of Chronos" description="a ranger of Chronos" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="1800" soulmax="100" gainsoulticks="120"
fromvoc="46">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="46" name="Ranger of Poseidon" description="a ranger of Poseidon" needpremium="0"
gaincap="15" gainhp="5" gainmana="6" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="41">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="41" name="Ranger of Apollo" description="a ranger of Apollo" needpremium="0"
gaincap="15" gainhp="5" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="36">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="36" name="Ranger of Zeus" description="a ranger of Zeus" needpremium="0"
gaincap="15" gainhp="6" gainmana="5" gainhpticks="4" gainhpamount="5" gainmanaticks="5"
gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120"
fromvoc="31">
<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="1.0"
shielding="1.5" fishing="1.1" experience="1.0"/>
</vocation>
</vocations>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local voc_msg = "You already worship another God." --- the msg he will get if he have joined other relegion.
local msg_info = "you will get 20% more health per level if you follow me immortal" -- the msg they get if they want to know info about the powers and relegion they are going to join and have
local msg_join = "You have succefully chosen to follow me, here is some of my power." -- msg he will get on joining team , better to have some info about what powers he get = generation of mana and max mana etc :)
local promo = 1 -- [1] will be equal + 5 for each voc , [2] will be equal + 10 for each voc etc... like normal promotion
local voc = {1,2,3,4}
function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if not isInArray(voc,getPlayerVocation(cid)) then
return selfSay(voc_msg,cid)
end
if msgcontains(msg, 'join') then
npcHandler:say('So do you want to worship me? you will get 20% more health per level if you follow me immortal', cid)
talkState[talkUser] = 1
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then
tid = getPlayerName(cid)
npcHandler:say(msg_join, cid)
talkState[talkUser] = 0
setPlayerPromotionLevel(cid,promo)
elseif msgcontains(msg, 'no') and talkState[talkUser] == 1 then
npcHandler:say('Seems you dont have a strong beleif in me.', cid)
talkState[talkUser] = 0
elseif msgcontains(msg, 'info') then
npcHandler:say(msg_info, cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())