Elox
http://elox.se/
nvm i was wrong
Last edited:
serverSaveEnabled = "no"
serverSaveHour = 3
shutdownAtServerSave = "no"
cleanMapAtServerSave = "yes"
-- Server saving
autoSaveEachMinutes = 15
saveGlobalStorage = "no"
Any way of shutting off the cap system? And where?
I'm having a problem editing vocations, whenever I edit them, and I edit the spells.xml to coincide with the new voc's I get about 100 spell errors in the console, what exactly am I missing here cause I can't find anything else to edit to make them work.
<?xml version="1.0" encoding="UTF-8"?>
<spells>
<!-- Attack Runes -->
<rune name="Poison Field" id="2285" allowfaruse="1" charges="3" lvl="14" maglv="0" exhaustion="2000" blocktype="solid" script="attack/poison field.lua"/>
<rune name="Poison Bomb" id="2286" allowfaruse="1" charges="2" lvl="25" maglv="4" exhaustion="2000" blocktype="solid" script="attack/poison bomb.lua"/>
<rune name="Poison Wall" id="2289" allowfaruse="1" charges="4" lvl="29" maglv="5" exhaustion="2000" blocktype="solid" script="attack/poison wall.lua"/>
<rune name="Fire Field" id="2301" allowfaruse="1" charges="3" lvl="15" maglv="1" exhaustion="2000" blocktype="solid" script="attack/fire field.lua"/>
<rune name="Firebomb" id="2305" allowfaruse="1" charges="2" lvl="27" maglv="5" exhaustion="2000" blocktype="solid" script="attack/fire bomb.lua"/>
<rune name="Fire Wall" id="2303" allowfaruse="1" charges="4" lvl="33" maglv="6" exhaustion="2000" blocktype="solid" script="attack/fire wall.lua"/>
<rune name="Soulfire" id="2308" allowfaruse="1" charges="3" lvl="27" maglv="7" exhaustion="2000" needtarget="1" blocktype="solid" script="attack/soul fire.lua"/>
<rune name="Fireball" id="2302" allowfaruse="1" charges="5" lvl="27" maglv="4" exhaustion="2000" needtarget="1" blocktype="solid" script="attack/fireball.lua"/>
<rune name="Great Fireball" id="2304" allowfaruse="1" charges="4" lvl="30" maglv="4" exhaustion="2000" blocktype="solid" script="attack/great fireball.lua"/>
<rune name="Energy Field" id="2277" allowfaruse="1" charges="3" lvl="18" maglv="3" exhaustion="2000" blocktype="solid" script="attack/energy field.lua"/>
<rune name="Energybomb" id="2262" allowfaruse="1" charges="2" lvl="37" maglv="10" exhaustion="2000" blocktype="solid" script="attack/energy bomb.lua"/>
<rune name="Energy Wall" id="2279" allowfaruse="1" charges="4" lvl="41" maglv="9" exhaustion="2000" blocktype="solid" script="attack/energy wall.lua"/>
<rune name="Light Magic Missile" id="2287" allowfaruse="1" charges="10" lvl="15" exhaustion="2000" maglv="0" needtarget="1" blocktype="solid" script="attack/light magic missile.lua"/>
<rune name="Heavy Magic Missile" id="2311" allowfaruse="1" charges="10" lvl="25" exhaustion="2000" maglv="3" needtarget="1" blocktype="solid" script="attack/heavy magic missile.lua"/>
<rune name="Explosion" id="2313" allowfaruse="1" charges="6" lvl="31" maglv="6" exhaustion="2000" blocktype="solid" script="attack/explosion.lua"/>
<rune name="Sudden Death" id="2268" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="2000" needtarget="1" blocktype="solid" script="attack/sudden death.lua"/>
<rune name="Icicle" id="2271" allowfaruse="1" charges="5" lvl="28" maglv="4" exhaustion="2000" needtarget="1" script="attack/icicle.lua"/>
<rune name="Avalanche" id="2274" allowfaruse="1" charges="4" lvl="30" maglv="4" exhaustion="2000" script="attack/avalanche.lua"/>
<rune name="Stone Shower" id="2288" allowfaruse="1" charges="4" lvl="28" maglv="4" exhaustion="2000" script="attack/stone shower.lua"/>
<rune name="Thunderstorm" id="2315" allowfaruse="1" charges="4" lvl="28" maglv="4" exhaustion="2000" script="attack/thunderstorm.lua"/>
<rune name="Stalagmite" id="2292" allowfaruse="1" charges="10" lvl="24" maglv="3" exhaustion="2000" needtarget="1" script="attack/stalagmite.lua"/>
<!-- Healing Runes -->
<rune name="Antidote Rune" id="2266" allowfaruse="1" charges="1" lvl="15" maglv="0" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" script="healing/antidote rune.lua"/>
<rune name="Intense Healing Rune" id="2265" allowfaruse="1" charges="1" lvl="15" maglv="1" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" script="healing/intense healing rune.lua"/>
<rune name="Ultimate Healing Rune" id="2273" allowfaruse="1" charges="1" lvl="24" maglv="4" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" script="healing/ultimate healing rune.lua"/>
<!-- Summon Runes -->
<rune name="Convince Creature" id="2290" allowfaruse="1" charges="1" lvl="16" maglv="5" exhaustion="2000" needtarget="1" blocktype="solid" function="convince"/>
<rune name="Animate Dead" id="2316" allowfaruse="1" charges="1" lvl="27" maglv="4" exhaustion="2000" blocktype="solid" script="summon/animate dead rune.lua"/>
<!-- Support Runes -->
<rune name="Desintegrate" id="2310" allowfaruse="0" charges="3" lvl="21" maglv="4" exhaustion="2000" range="5" script="support/desintegrate rune.lua"/>
<rune name="Destroy Field" id="2261" allowfaruse="1" charges="3" lvl="17" maglv="3" exhaustion="1000" aggressive="0" range="5" script="support/destroy field rune.lua"/>
<rune name="Chameleon" id="2291" allowfaruse="1" charges="1" lvl="27" maglv="4" exhaustion="1000" aggressive="0" selftarget="1" blocktype="solid" function="chameleon"/>
<rune name="Magic Wall" id="2293" allowfaruse="1" charges="3" lvl="32" maglv="9" exhaustion="1000" aggressive="0" blocktype="all" script="support/magic wall rune.lua"/>
<rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" script="support/paralyze rune.lua"/>
<!-- Custom Runes -->
<rune name="Polymorph" id="2270" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="custom/polymorph.lua"/>
<rune name="Combustion" id="2269" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="custom/combustion.lua"/>
<rune name="Energy Arrow" id="2281" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="attack/energy wave.lua"/>
<rune name="Magic Prison" id="2272" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="custom/magic prison.lua"/>
<rune name="Stealth" id="2283" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="support/invisible.lua"/>
<rune name="Drunkness" id="2267" charges="1" maglv="20" exhaustion="2000" blocktype="solid" allowfaruse="1" script="custom/drunk.lua"/>
<!-- Attack Spells -->
<instant name="Death Strike" words="exori mort" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/death strike.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Flame Strike" words="exori flam" lvl="12" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/flame strike.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Archmage" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Energy Strike" words="exori vis" lvl="12" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/energy strike.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Whirlwind Throw" words="exori hur" lvl="15" mana="40" prem="1" range="5" needtarget="1" blockwalls="1" needweapon="1" exhaustion="2000" needlearn="1" script="attack/whirlwind throw.lua">
<vocation name="Warrior" />
<vocation name="Knight" />
<vocation name="Templar" />
</instant>
<instant name="Fire Wave" words="exevo flam hur" lvl="18" mana="25" direction="1" exhaustion="2000" needlearn="1" script="attack/fire wave.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</instant>
<instant name="Ethereal Spear" words="exori con" lvl="23" mana="35" prem="1" range="5" needtarget="1" exhaustion="2000" blockwalls="1" needlearn="1" script="attack/ethereal spear.lua">
<vocation name="Paladin" />
<vocation name="Hunter" />
<vocation name="Archer" />
</instant>
<instant name="Energy Beam" words="exevo vis lux" lvl="23" mana="40" direction="1" exhaustion="2000" needlearn="1" script="attack/energy beam.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</instant>
<instant name="Great Energy Beam" words="exevo gran vis lux" lvl="29" mana="110" direction="1" exhaustion="2000" needlearn="1" script="attack/great energy beam.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</instant>
<instant name="Groundshaker" words="exori mas" lvl="33" mana="160" prem="1" needweapon="1" exhaustion="2000" needlearn="1" script="attack/groundshaker.lua">
<vocation name="Warrior" />
<vocation name="Knight" />
<vocation name="Templar" />
</instant>
<instant name="Berserk" words="exori" lvl="35" mana="115" prem="1" needweapon="1" exhaustion="2000" needlearn="1" script="attack/berserk.lua">
<vocation name="Knight" />
<vocation name="Warrior" />
<vocation name="Templar" />
</instant>
<instant name="Energy Wave" words="exevo vis hur" lvl="38" mana="170" direction="1" exhaustion="2000" needlearn="1" script="attack/energy wave.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</instant>
<instant name="Rage of the Skies" words="exevo gran mas vis" lvl="55" mana="650" selftarget="1" prem="1" exhaustion="2000" needlearn="1" script="attack/rage of the skies.lua">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</instant>
<instant name="Fierce Berserk" words="exori gran" lvl="70" mana="340" prem="1" needweapon="1" exhaustion="2000" needlearn="1" script="attack/fierce berserk.lua">
<vocation name="Knight" />
<vocation name="Warrior" />
<vocation name="Templar" />
</instant>
<instant name="Hells Core" words="exevo gran mas flam" lvl="60" mana="1200" prem="1" exhaustion="2000" selftarget="1" needlearn="1" script="attack/hells core.lua">
<vocation name="Mage"/>
<vocation name="Wizard"/>
<vocation name="Archmage" />
</instant>
<instant name="Divine Missile" words="exori san" lvl="40" mana="20" prem="1" casterTargetOrDirection="1" needlearn="1" lockwalls="1" exhaustion="2000" script="attack/divine missile.lua">
<vocation name="Paladin"/>
<vocation name="Archer"/>
<vocation name="Hunter" />
<vocation name="Templar" />
</instant>
<instant name="Divine Caldera" words="exevo mas san" lvl="50" mana="160" prem="1" selftarget="1" exhaustion="2000" needlearn="1" script="attack/divine caldera.lua">
<vocation name="Paladin"/>
<vocation name="Archer"/>
<vocation name="Hunter" />
</instant>
<instant name="Eternal Winter" words="exevo gran mas frigo" lvl="60" mana="1200" prem="1" selftarget="1" exhaustion="2000" needlearn="1" script="attack/eternal winter.lua">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</instant>
<instant name="Ice Strike" words="exori frigo" lvl="15" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/ice strike.lua">
<vocation name="Mage"/>
<vocation name="Wizard"/>
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Archmage" />
<vocation name="Flamen" />
</instant>
<instant name="Ice Wave" words="exevo frigo hur" lvl="18" mana="25" direction="1" exhaustion="2000" needlearn="1" script="attack/ice wave.lua">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</instant>
<instant name="Terra Strike" words="exori tera" lvl="13" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" script="attack/terra strike.lua">
<vocation name="Mage"/>
<vocation name="Wizard"/>
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Archmage" />
<vocation name="Flamen" />
</instant>
<instant name="Terra Wave" words="exevo tera hur" lvl="38" mana="210" direction="1" exhaustion="2000" needlearn="1" script="attack/terra wave.lua">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</instant>
<instant name="Wrath of Nature" words="exevo gran mas tera" lvl="55" mana="770" prem="1" selftarget="1" exhaustion="2000" needlearn="1" script="attack/wrath of nature.lua">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</instant>
<!-- Healing Spells -->
<instant name="Light Healing" words="exura" lvl="9" mana="25" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="healing/light healing.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Templar" />
<vocation name="Flamen" />
<vocation name="Hunter" />
<vocation name="Warrior" />
<vocation name="Wizard" />
</instant>
<instant name="Antidote" words="exana pox" lvl="10" mana="30" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="healing/antidote.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Templar" />
<vocation name="Flamen" />
<vocation name="Hunter" />
<vocation name="Warrior" />
<vocation name="Wizard" />
</instant>
<instant name="Intense Healing" words="exura gran" lvl="11" mana="70" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="healing/intense healing.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Hunter" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Heal Friend" words="exura sio" lvl="18" mana="140" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="2000" needlearn="1" script="healing/heal friend.lua">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</instant>
<instant name="Ultimate Healing" words="exura vita" lvl="20" mana="160" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="healing/ultimate healing.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Hunter" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Mass Healing" words="exura gran mas res" lvl="36" mana="150" prem="1" aggressive="0" exhaustion="1000" needlearn="1" script="healing/mass healing.lua">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</instant>
<instant name="Divine Healing" words="exura san" lvl="35" mana="210" prem="1" selftarget="1" aggressive="0" exhaustion="1000" needlearn="1" script="healing/divine healing.lua">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</instant>
<instant name="Wound Cleansing" words="exana mort" lvl="30" mana="65" prem="1" selftarget="1" aggressive="0" exhaustion="1000" needlearn="1" script="healing/wound cleasing.lua">
<vocation name="Knight" />
<vocation name="Templar" />
<vocation name="Warrior" />
</instant>
<!-- Support Spells -->
<instant name="Light" words="utevo lux" lvl="8" mana="20" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/light.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Find Person" words="exiva" lvl="8" mana="20" aggressive="0" params="1" exhaustion="1000" needlearn="1" function="searchPlayer">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Magic Rope" words="exani tera" lvl="9" mana="20" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/magic rope.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Levitate" words="exani hur" lvl="12" mana="50" prem="1" aggressive="0" exhaustion="1000" params="1" needlearn="1" function="Levitate">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Great Light" words="utevo gran lux" lvl="13" mana="60" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/great light.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Magic Shield" words="utamo vita" lvl="14" mana="50" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/magic shield.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Flamen" />
<vocation name="Hunter" />
<vocation name="Wizard" />
</instant>
<instant name="Haste" words="utani hur" lvl="14" mana="60" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/haste.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Knight" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Warrior" />
<vocation name="Wizard" />
<vocation name="Hunter" />
<vocation name="Flamen" />
<vocation name="Templar" />
</instant>
<instant name="Challenge" words="exeta res" lvl="20" mana="30" prem="1" aggressive="0" exhaustion="1000" needlearn="1" script="support/challenge.lua">
<vocation name="Knight" />
<vocation name="Templar" />
<vocation name="Warrior" />
</instant>
<instant name="Strong Haste" words="utani gran hur" lvl="20" mana="100" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/strong haste.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Creature Illusion" words="utevo res ina" lvl="23" mana="100" aggressive="0" params="1" exhaustion="1000" needlearn="1" function="Illusion">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Ultimate Light" words="utevo vis lux" lvl="26" mana="140" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/ultimate light.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Cancel Invisibility" words="exana ina" lvl="26" mana="200" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/cancel invisibility.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Wild Growth" words="exevo grav vita" lvl="27" mana="220" prem="1" direction="1" blocking="1" exhaustion="2000" needlearn="1" script="support/wild growth.lua">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</instant>
<instant name="Invisibility" words="utana vid" lvl="35" mana="440" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" script="support/invisible.lua">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<!-- Summon Spells -->
<instant name="Summon Creature" words="utevo res" lvl="25" params="1" exhaustion="2000" needlearn="1" function="summonMonster">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</instant>
<instant name="Undead Legion" words="exana mas mort" lvl="30" mana="500" prem="1" exhaustion="2000" needlearn="1" script="summon/undead legion.lua">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</instant>
<!-- Conjure Spells -->
<conjure name="Conjure Arrow" words="exevo con" lvl="13" mana="100" soul="1" conjureId="2544" conjureCount="10" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Food" words="exevo pan" lvl="14" mana="120" soul="1" exhaustion="1000" needlearn="1" function="conjureFood">
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Flamen" />
<vocation name="Hunter" />
</conjure>
<conjure name="Poisoned Arrow" words="exevo con pox" lvl="16" mana="130" soul="2" conjureId="2545" conjureCount="7" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Conjure Bolt" words="exevo con mort" lvl="17" mana="140" soul="2" prem="1" conjureId="2543" conjureCount="5" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Conjure Sniper Arrow" words="exevo con hur" lvl="24" mana="160" soul="3" prem="1" conjureId="7364" conjureCount="5" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Explosive Arrow" words="exevo con flam" lvl="25" mana="290" soul="3" conjureId="2546" conjureCount="8" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Conjure Piercing Bolt" words="exevo con grav" lvl="33" mana="180" soul="3" prem="1" conjureId="7363" conjureCount="5" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Enchant Staff" words="exeta vis" lvl="41" mana="80" prem="1" conjureId="2433" reagentId="2401" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Mage" />
<vocation name="Wizard" />
<vocation name="Archmage" />
</conjure>
<conjure name="Enchant Spear" words="exeta con" lvl="45" mana="350" soul="3" prem="1" conjureId="7367" reagentId="2389" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Hunter" />
<vocation name="Archer" />
</conjure>
<conjure name="Power Bolt" words="exevo con vis" lvl="59" mana="800" soul="4" prem="1" conjureId="2547" conjureCount="10" exhaustion="1000" needlearn="1" function="conjureItem">
<vocation name="Paladin" />
<vocation name="Archer" />
<vocation name="Hunter" />
</conjure>
<conjure name="Poison Field" words="adevo grav pox" lvl="14" mana="200" soul="1" reagentId="2260" conjureId="2285" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Flamen" />
<vocation name="Wizard" />
</conjure>
<conjure name="Light Magic Missile" words="adori min vis" lvl="15" mana="120" soul="1" reagentId="2260" conjureId="2287" conjureCount="10" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Flamen" />
<vocation name="Wizard" />
</conjure>
<conjure name="Fire Field" words="adevo grav flam" lvl="15" mana="240" soul="1" reagentId="2260" conjureId="2301" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Flamen" />
<vocation name="Wizard" />
</conjure>
<conjure name="Fireball" words="adori flam" lvl="27" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2302" conjureCount="5" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</conjure>
<conjure name="Energy Field" words="adevo grav vis" lvl="18" mana="320" soul="2" reagentId="2260" conjureId="2277" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Flamen" />
<vocation name="Wizard" />
</conjure>
<conjure name="Stalagmite" words="adori tera" lvl="24" mana="400" soul="2" prem="2" reagentId="2260" conjureId="2292" conjureCount="10" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Great Fireball" words="adori mas flam" lvl="30" mana="530" soul="3" reagentId="2260" conjureId="2304" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Sorcerer" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</conjure>
<conjure name="Heavy Magic Missile" words="adori vis" lvl="25" mana="350" soul="2" reagentId="2260" conjureId="2311" conjureCount="10" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Sorcerer" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</conjure>
<conjure name="Poison Bomb" words="adevo mas pox" lvl="25" mana="520" soul="2" prem="1" reagentId="2260" conjureId="2286" conjureCount="2" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Firebomb" words="adevo mas flam" lvl="27" mana="600" soul="4" reagentId="2260" conjureId="2305" conjureCount="2" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Soulfire" words="adevo res flam" lvl="27" mana="600" soul="3" prem="1" reagentId="2260" conjureId="2308" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Poison Wall" words="adevo mas grav pox" lvl="29" mana="640" soul="3" reagentId="2260" conjureId="2289" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Explosion" words="adevo mas hur" lvl="31" mana="570" soul="4" reagentId="2260" conjureId="2313" conjureCount="6" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Fire Wall" words="adevo mas grav flam" lvl="33" mana="780" soul="4" reagentId="2260" conjureId="2303" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Energybomb" words="adevo mas vis" lvl="37" mana="880" soul="5" prem="1" reagentId="2260" conjureId="2262" conjureCount="2" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Energy Wall" words="adevo mas grav vis" lvl="41" mana="1000" soul="5" reagentId="2260" conjureId="2279" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Sudden Death" words="adori gran mort" lvl="45" mana="985" soul="5" reagentId="2260" conjureId="2268" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</conjure>
<conjure name="Antidote Rune" words="adana pox" lvl="15" mana="200" soul="1" reagentId="2260" conjureId="2266" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Intense Healing Rune" words="adura gran" lvl="15" mana="240" soul="2" reagentId="2260" conjureId="2265" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Ultimate Healing Rune" words="adura vita" lvl="24" mana="400" soul="3" reagentId="2260" conjureId="2273" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Convince Creature" words="adeta sio" lvl="16" mana="200" soul="3" reagentId="2260" conjureId="2290" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Animate Dead" words="adana mort" lvl="27" mana="600" soul="5" prem="1" reagentId="2260" conjureId="2316" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Wizard" />
<vocation name="Flamen" />
</conjure>
<conjure name="Chameleon" words="adevo ina" lvl="27" mana="600" soul="2" reagentId="2260" conjureId="2291" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Destroy Field" words="adito grav" lvl="17" mana="120" soul="2" reagentId="2260" conjureId="2261" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Flamen" />
<vocation name="Hunter" />
<vocation name="Wizard" />
</conjure>
<conjure name="Desintegrate" words="adito tera" lvl="21" mana="200" soul="3" prem="1" reagentId="2260" conjureId="2310" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Mage" />
<vocation name="Druid" />
<vocation name="Paladin" />
<vocation name="Archmage" />
<vocation name="Priest" />
<vocation name="Archer" />
<vocation name="Flamen" />
<vocation name="Hunter" />
<vocation name="Wizard" />
</conjure>
<conjure name="Magic Wall" words="adevo grav tera" lvl="32" mana="750" soul="5" prem="1" reagentId="2260" conjureId="2293" conjureCount="3" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Sorcerer" />
<vocation name="Archmage" />
<vocation name="Wizard" />
</conjure>
<conjure name="Paralyze" words="adana ani" lvl="54" mana="1400" soul="3" prem="1" reagentId="2260" conjureId="2278" conjureCount="1" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid" />
<vocation name="Priest" />
<vocation name="Flamen" />
</conjure>
<conjure name="Icicle" words="adori frigo" lvl="28" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2271" conjureCount="5" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</conjure>
<conjure name="Avalanche" words="adori mas frigo" lvl="30" mana="530" soul="3" reagentId="2260" conjureId="2274" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</conjure>
<conjure name="Stone Shower" words="adori mas tera" lvl="28" mana="430" soul="3" prem="1" reagentId="2260" conjureId="2288" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Druid"/>
<vocation name="Priest"/>
<vocation name="Flamen" />
</conjure>
<conjure name="Thunderstorm" words="adori mas vis" lvl="28" mana="430" soul="3" prem="1" reagentId="2260" conjureId="2315" conjureCount="4" exhaustion="1000" needlearn="1" function="conjureRune">
<vocation name="Sorcerer"/>
<vocation name="Archmage"/>
<vocation name="Wizard" />
</conjure>
<!-- Custom Spells -->
<instant name="Apocalypse" words="exevo mas lux" lvl="40" manapercent="60" exhaustion="2000" needlearn="1" script="custom/apocalypse.lua">
<vocation name="Archmage"/>
<vocation name="Wizard" />
</instant>
<!-- House Spells -->
<instant name="House Guest List" words="aleta sio" selftarget="1" function="editHouseGuest"/>
<instant name="House Subowner List" words="aleta som" selftarget="1" function="editHouseSubOwner"/>
<instant name="House Door List" words="aleta grav" selftarget="1" function="editHouseDoor"/>
<instant name="House Kick" words="alana sio" params="1" function="houseKick"/>
</spells>
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
<vocation id="0" name="None" description="none" 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">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="1" name="Mage" description="a sorcerer" 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" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="2" name="Druid" description="a druid" 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" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="3" name="Hunter" description="a paladin" 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" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="4" name="Warrior" description="a knight" 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" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="5" name="Archmage" description="a master sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="1">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="6" name="Priest" description="an elder druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="2">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="7" name="Archer" description="a royal paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="3">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="8" name="Knight" description="an elite knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="4">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
</vocation>
<vocation id="15" name="Wizard" description="a master sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="2.0"/>
<skill id="2" multiplier="2.0"/>
<skill id="3" multiplier="2.0"/>
<skill id="4" multiplier="2.0"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="16" name="Flamen" description="an elder druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.5"/>
<skill id="1" multiplier="1.8"/>
<skill id="2" multiplier="1.8"/>
<skill id="3" multiplier="1.8"/>
<skill id="4" multiplier="1.8"/>
<skill id="5" multiplier="1.5"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="17" name="Paladin" description="a royal paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.2"/>
<skill id="1" multiplier="1.2"/>
<skill id="2" multiplier="1.2"/>
<skill id="3" multiplier="1.2"/>
<skill id="4" multiplier="1.1"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
<vocation id="18" name="Templar" description="an elite knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8">
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
<skill id="0" multiplier="1.1"/>
<skill id="1" multiplier="1.1"/>
<skill id="2" multiplier="1.1"/>
<skill id="3" multiplier="1.1"/>
<skill id="4" multiplier="1.4"/>
<skill id="5" multiplier="1.1"/>
<skill id="6" multiplier="1.1"/>
</vocation>
</vocations>
-- Umby
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false
-- masterpos is the location that the player will first be teleported to. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot)
local masterpos = {x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the movement script
local timeLimit = 600 -- this is the time limit in seconds (600 = 10 minutes) this has to match the timeLimit in the Svargrond.lua script aswell.
local arenaCost = {1000, 5000, 10000} -- this is the ammount of gp it costs to start the arena (first, second, third.)
-- you shouldnt need to edit any more of the script.
local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1}
local npcpos = {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}
local playerID = getGlobalStorageValue(9000)
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 onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureTurn(creature)
end
local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out:
setGlobalStorageValue(3000,-1) -- if the arena is in use or not
setGlobalStorageValue(9000,-1) -- if the arena is in use or not
arenaStatus = 0
arenaStatus1 = 0
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
setPlayerStorageValue(cid,9000,-1) -- reset the player ID
focus = 0
talk_start = 0
end
local function arenaStartFirstLvl(cid)
setGlobalStorageValue(3000,1) -- if the arena is in use or not
setPlayerStorageValue(cid,5029,1) -- set the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not
doTeleportThing(cid, {x=masterpos.x+24,y=masterpos.y-1,z=masterpos.z})
arenaStatus = arenaStatus1
end
local function arenaStartSecondLvl(cid)
setGlobalStorageValue(3000,1) -- if the arena is in use or not
setPlayerStorageValue(cid,5029,2) -- set the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not
doTeleportThing(cid, {x = masterpos.x+24, y = masterpos.y-1, z = masterpos.z})
arenaStatus = arenaStatus1
end
local function arenaStartThirdLvl(cid)
setGlobalStorageValue(3000,1) -- if the arena is in use or not
setPlayerStorageValue(cid,5029,3) -- set the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not
doTeleportThing(cid, {x = masterpos.x+24, y = masterpos.y-1, z = masterpos.z})
arenaStatus = arenaStatus1
end
local function doCheckStone(stonepos)
local stone = getThingfromPos(stonepos)
if stone.itemid ~= 1354 then
doCreateItem(1354,1,stonepos)
end
if stone.actionid == 6000 then
doSetItemActionId(stone.uid,5999)
end
end
function onCreatureDisappear(cid, pos)
if getGlobalStorageValue(3000) ~= 1 then
arenaStatus = 0
arenaStatus1 = 0
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
focus = 0
end
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
cname = getCreatureName(cid)
if (msgcontains(msg, 'hi') and (focus == 0) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) ~= 1) then
selfSay('Hello competitor! Do you want to fight in the arena or shall I explain the rules first?')
talk_state = 0
arenaStatus = 0
focus = cid
talk_start = os.clock()
setGlobalStorageValue(3000,-1)
setPlayerStorageValue(cid,5030,-1)
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
setPlayerStorageValue(cid,2998,-1) -- resets so that the time limit will start
setPlayerStorageValue(cid,9000,-1) -- playerID reset so no one has the same one when they start (unless you win the lottery often)
setPlayerStorageValue(cid,2999,-1) -- this makes sure the player isnt tped into the arena twice by being an idiot and stepping on the start teleport more then once in 0.5 seconds (might sound confusing)
elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) == 1 and getPlayerStorageValue(cid,5029) == 1 and getPlayerStorageValue(cid,3002) > 0) then
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
selfSay('Someone is currently participating in the arena. Please wait your turn.')
elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) == 1) then
selfSay('Someone is currently participating in the arena. Please wait your turn.')
elseif (focus == cid and getPlayerStorageValue(cid,3002) < 0) then
talk_start = os.clock()
if msgcontains(msg, 'rules') or msgcontains(msg, 'rule') or msgcontains(msg, 'first') then
selfSay('What do you want to know? Something about the three different difficulties, the general rules or the prices? Maybe you also want to know what happens when you die?')
elseif msgcontains(msg, 'die') or msgcontains(msg, 'death') then
selfSay('It would be better not to die! In every pit there is an emergency exit to the south. If you die in a pit... well... your corpse and backpack are gone, so enter at your own risk.')
elseif msgcontains(msg, 'different') or msgcontains(msg, 'difficulties') or msgcontains(msg, 'level') or msgcontains(msg, 'lvl') then
selfSay('There are three difficulties: Greenhorn, Scrapper and Warlord. On each challenge you will be confronted with ten monsters increasing in strength.')
elseif talk_state == 0 and (msgcontains(msg, 'greenhorn') or msgcontains(msg, 'green') or msgcontains(msg, 'horn')) then
selfSay('That is the easiest way in our arena. The fee is 1000 gold. We were setting this up for of our children to challenge some easy monsters and train them for the future.')
elseif talk_state == 0 and (msgcontains(msg, 'scrapper') or msgcontains(msg, 'scrap')) then
selfSay('The most common difficulty for us. The fee is 5000 gold. So if you are experienced in fighting middle class monsters this is your challenge!')
elseif talk_state == 0 and (msgcontains(msg, 'warlord') or msgcontains(msg, 'war') or msgcontains(msg, 'lord')) then
selfSay('Only the strongest among us will take this challenge. The fee is 10000 gold. If you pass that I promise you the respect of all citizens here. You will be a hero!')
elseif msgcontains(msg, 'price') or msgcontains(msg, 'prices') or msgcontains(msg, 'cost') or msgcontains(msg, 'offer') then
selfSay('The fee is 1,000/5,000/10,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack.')
elseif msgcontains(msg, 'general') then
selfSay('Basically you pay me a fee, and you are sent into an arena with 10 different stages. If you succeed you will be rewarded accordingly.')
elseif talk_state == 1 and (msgcontains(msg, 'greenhorn') or msgcontains(msg, 'green') or msgcontains(msg, 'horn')) then
if getPlayerStorageValue(cid,3001) < 2 then
selfSay('The fee is 1,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the low difficulty?')
arenaStatus1 = 1
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
elseif getPlayerStorageValue(cid,3001) == 2 or getPlayerStorageValue(cid,3001) == 3 then
selfSay('You have already completed the arena on this difficulty.')
elseif getPlayerStorageValue(cid,3001) == 4 then
selfSay('You may not enter the arena after finishing it.')
end
elseif talk_state == 1 and (msgcontains(msg, 'scrapper') or msgcontains(msg, 'scrap')) then
if getPlayerStorageValue(cid,3001) == -1 then
selfSay('You have to complete the \'Greenhorn\' difficulty before you may attempt the \'Scrapper\' difficulty.')
elseif getPlayerStorageValue(cid,3001) == 3 then
selfSay('You have already completed the arena on this difficulty.')
elseif getPlayerStorageValue(cid,3001) == 4 then
selfSay('You may not enter the arena after finishing it.')
elseif getPlayerStorageValue(cid,3001) == 2 then
selfSay('The fee is 5,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the medium difficulty?')
arenaStatus1 = 2
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
end
elseif talk_state == 1 and (msgcontains(msg, 'warlord') or msgcontains(msg, 'war') or msgcontains(msg, 'lord')) then
if getPlayerStorageValue(cid,3001) == -1 then
selfSay('You have to complete the \'Greenhorn\' difficulty before you may attempt the \'Warlord\' difficulty.')
elseif getPlayerStorageValue(cid,3001) == 2 then
selfSay('You have to complete the \'Scrapper\' difficulty before you may attempt the \'Warlord\' difficulty.')
elseif getPlayerStorageValue(cid,3001) == 4 then
selfSay('You may not enter the arena after finishing it.')
elseif getPlayerStorageValue(cid,3001) == 3 then
selfSay('The fee is 10,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the high difficulty?')
arenaStatus1 = 3
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
end
elseif msgcontains(msg, 'fight') or msgcontains(msg, 'start') or msgcontains(msg, 'begin') then
selfSay('So you agree to the rules and want to participate in the challenge? Which difficulty do you choose, Greenhorn, Scrapper or Warlord?')
talk_state = 1
elseif msgcontains(msg, 'no') then
selfSay('Well get back to me when you\'d like to attempt the arena.')
talk_state = 0
elseif msgcontains(msg, 'bye') then
selfSay('See ya next time.')
focus = 0
talk_state = 0
talk_start = 0
elseif talk_state == 1 and msgcontains(msg, 'yes') then
if arenaStatus1 == 1 then --first
if (doPlayerRemoveMoney(focus, arenaCost[1]) == TRUE) then
selfSay('As you wish!')
talk_state = 0
arenaStartFirstLvl(focus)
setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP
local rand = math.random(1, 15000) -- this will make the player unique hopefully
setGlobalStorageValue(9000,rand)
setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days
else
selfSay('You dont have enough gold to attempt this difficulty.')
talk_state = 0
end
elseif arenaStatus1 == 2 then --second
if (doPlayerRemoveMoney(focus, arenaCost[2]) == TRUE) then
selfSay('As you wish!')
talk_state = 0
arenaStartSecondLvl(focus)
setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP
local rand = math.random(1, 15000) -- this will make the player unique hopefully
setGlobalStorageValue(9000,rand)
setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days
else
selfSay('You dont have enough gold to attempt this difficulty.')
talk_state = 0
end
elseif arenaStatus1 == 3 then --third
if (doPlayerRemoveMoney(focus, arenaCost[3]) == TRUE) then
selfSay('As you wish!')
talk_state = 0
arenaStartThirdLvl(focus)
setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP
local rand = math.random(1, 15000) -- this will make the player unique hopefully
setGlobalStorageValue(9000,rand)
setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days
else
selfSay('You dont have enough gold to attempt this difficulty.')
talk_state = 0
end
end
end
end
end
function onThink()
doNpcSetCreatureFocus(focus)
if focus > 0 then
if (getGlobalStorageValue(3001) == 1 and getPlayerStorageValue(focus,5030) == 1) then -- this is going to be what teleports the player into the arena to make sure that no one gets in without the NPC's focus also makes sure the player stepped on the teleport and not someone else
doTeleportThing(focus, {x = masterpos.x, y = masterpos.y, z = masterpos.z})
doSendMagicEffect({x = masterpos.x, y = masterpos.y, z = masterpos.z},10)
setGlobalStorageValue(3001,-1)
setPlayerStorageValue(focus,5030,-1)
elseif (getPlayerStorageValue(focus,3002) == 1 and (os.clock() - talk_start) > timeLimit) then -- player ran out of time while in the arena
doTeleportThing(focus, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
doPlayerSendTextMessage(focus, 22, "Time is up! Sorry, you took too long. Thanks and Good luck next time!")
arenaOver(focus)
elseif (getGlobalStorageValue(3000) ~= 1 and arenaStatus ~= nil and arenaStatus > 0) then -- this is a backup and will make sure to set the focus to 0 after the player completes the arena.
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
arenaOver(focus)
elseif (getGlobalStorageValue(3000) == 1 and getPlayerByName(getPlayerName(focus)) == 0) then -- player must have logged out while in the arena
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
setGlobalStorageValue(3000,-1) -- if the arena is in use or not
arenaStatus = 0
arenaStatus1 = 0
focus = 0
elseif (arenaStatus > 0 and getPlayerStorageValue(focus, 3002) == -1) then -- this is a backup
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
arenaOver(focus)
elseif (getGlobalStorageValue(3000) == 1 and (((npcpos.x-getPlayerPosition(focus).x) > 85) or ((npcpos.x-getPlayerPosition(focus).x) < -30) or ((npcpos.y-getPlayerPosition(focus).y) > 50) or ((npcpos.y-getPlayerPosition(focus).y) < -13) or (getPlayerPosition(focus).z ~= npcpos.z))) then -- player must have been teleported out ( will not remove the monster if u tp the player out so dont)
doCheckStone(stone1pos)
doCheckStone(stone2pos)
doCheckStone(stone3pos)
doCheckStone(stone4pos)
doCheckStone(stone5pos)
doCheckStone(stone6pos)
doCheckStone(stone7pos)
doCheckStone(stone8pos)
doCheckStone(stone9pos)
doCheckStone(stone10pos)
end
end
end
-- Umby
-- masterpos is the location that the player will first be teleported to. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot)
local masterpos = {x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the NPC script
-- you shouldnt need to edit any more of the script.
local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1}
function onStepIn(cid, item, pos)
playerID = getGlobalStorageValue(9000)
local function doCheckStoneId(stonepos)
local stone = getThingfromPos(stonepos)
if stone.itemid ~= 1354 then
doCreateItem(1354,1,stonepos)
end
if stone.actionid == 6000 then
doSetItemActionId(stone.uid,5999)
end
end
local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out:
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- player should be in the arena or not
setPlayerStorageValue(cid,2999,-1) -- dont mind this (addEvent)
end
if (item.actionid >= 3001 and item.actionid <= 3010) then
if isPlayer(cid) == TRUE then --make more efficient with (and) later
if getPlayerAccess(cid) < 3 then -- makes sure the player is not a monster/GM
if (getPlayerStorageValue(cid, 3002) ~= 1 or getGlobalStorageValue(3000) ~= 1) then -- player is not supposed to be in arena and must have logged in
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
arenaOver(cid)
elseif (getPlayerStorageValue(cid, 9000) ~= playerID) then -- this means the player probably logged off and waited for someone else to start the arena, then logged in. (its gotta be flawless!)
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doPlayerSendTextMessage(cid, 22, "You are not supposed to be in the arena at the moment.")
arenaOver(cid)
end
end
elseif (isCreature(cid) == TRUE and getGlobalStorageValue(3000) ~= 1) then -- if the timer runs out this will remove the creature
doCreatureAddHealth(cid,-10000)
doCheckStoneId(stone1pos)
doCheckStoneId(stone2pos)
doCheckStoneId(stone3pos)
doCheckStoneId(stone4pos)
doCheckStoneId(stone5pos)
doCheckStoneId(stone6pos)
doCheckStoneId(stone7pos)
doCheckStoneId(stone8pos)
doCheckStoneId(stone9pos)
doCheckStoneId(stone10pos)
end
end
end
-- Svargrond Arena by Arthur1408
-- masterpos É A LOCAçao do primeiro lugar que o player será teletransportado. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot)
local masterpos ={x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the NPC script
local timeLimit = 600 -- this is the time limit in seconds (600 = 10 minutes) this has to match the timeLimit in the arenaNPC.lua script aswell.
-- you shouldnt need to edit any more of the script.
local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1}
local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1}
local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1}
local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1}
local function doCheckStoneId(stonepos)
local stone = getThingfromPos(stonepos)
if stone.itemid ~= 1354 then
doCreateItem(1354,1,stonepos)
end
if stone.actionid == 6000 then
doSetItemActionId(stone.uid,5999)
end
end
local function doChange(cid, pos, creature, tpos)
local stone = getThingfromPos(pos)
doSetItemActionId(stone.uid,6000)
local pos = getThingPos(stone.uid)
monster = doSummonCreature(creature, pos)
doTeleportThing(cid,tpos)
doSendAnimatedText(tpos,"Fight!",198)
doSendMagicEffect(pos,10)
end
function onStepIn(cid, item, pos)
playerID = getGlobalStorageValue(9000)
local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out:
setGlobalStorageValue(3000,-1) -- if the arena is in use or not
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
setPlayerStorageValue(cid,2999,-1) -- dont mind this (addEvent)
end
local function doCheckLvl(cid, storage)
if getPlayerStorageValue(cid, storage) == 1 then -- easy
monsters = {"Frostfur", "Bloodpaw", "Bovinus", "Achad", "Colerian the Barbarian", "The Hairy One", "Axeitus Headbanger", "Rocky", "Cursed Gladiator", "Orcus the Cruel"}
elseif getPlayerStorageValue(cid, storage) == 2 then -- medium
monsters = {"Avalanche", "Kreebosh the Exile", "The Dark Dancer", "The Hag", "Slim", "Grimgor Guteater", "Drasilla", "Spirit of Earth", "Spirit of Water", "Spirit of Fire"}
elseif getPlayerStorageValue(cid, storage) == 3 then -- hard
monsters = {"Webster", "Darakan the Executioner", "Norgle Glacierbeard", "The Pit Lord", "Svoren The Mad", "The Masked Marauder", "Gnorre Chyllson", "Fallen Mooh'Tah Master Ghar", "Deathbringer", "The Obliverator"}
end
end
local function doCheckStone(stonepos)
local stone = getThingfromPos(stonepos)
if stone.actionid ~= 6000 and stone.itemid == 1354 then
return 0
elseif stone.actionid == 6000 or stone.itemid ~= 1354 then
return 1
end
end
local function roomBusy(cid, pos)
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doSendMagicEffect(pos,10)
doPlayerSendTextMessage(cid, 22, "The arena is in use right now, wait your turn!")
end
doCheckLvl(cid, 5029)
if item.actionid == 2002 then
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doCheckStoneId(stone1pos)
doCheckStoneId(stone2pos)
doCheckStoneId(stone3pos)
doCheckStoneId(stone4pos)
doCheckStoneId(stone5pos)
doCheckStoneId(stone6pos)
doCheckStoneId(stone7pos)
doCheckStoneId(stone8pos)
doCheckStoneId(stone9pos)
doCheckStoneId(stone10pos)
arenaOver(cid)
doCreatureAddHealth(monster,-10000) -- might give an error if someone leaves after the monster is dead
elseif item.actionid == 2003 then -- tp leading from the reward room to the NPC area
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
elseif item.actionid == 2004 and doCheckStone(stone1pos) == 0 then -- from the npc room, teleports you to room one
if (getGlobalStorageValue(3000) == 1 and hasAddedEvent ~= 1) then
local passArgs = {cid=cid, npos=npos}
setPlayerStorageValue(cid,5030,1)
setGlobalStorageValue(3001,1)
local npos = masterpos
if getPlayerStorageValue(cid,2999) == -1 then
addEvent(after1second,1000,passArgs)
setPlayerStorageValue(cid,2999,1)
end
else -- player was tped past the exp doors or logged in there or something
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doPlayerSendTextMessage(cid, 22, "Please talk to the NPC before entering the arena.")
setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy)
setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not
end
elseif item.actionid == 2005 and doCheckStone(stone2pos) == 0 then -- this takes you to room 2
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-14, y = masterpos.y, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[2], npos)
if getThingfromPos(stone1pos) ~= 1354 then
doCreateItem(1354,1,stone1pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2006 and doCheckStone(stone3pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-28, y = masterpos.y, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[3], npos)
if getThingfromPos(stone2pos) ~= 1354 then
doCreateItem(1354,1,stone2pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2007 and doCheckStone(stone4pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-42, y = masterpos.y, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[4], npos)
if getThingfromPos(stone3pos) ~= 1354 then
doCreateItem(1354,1,stone3pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2008 and doCheckStone(stone5pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-36, y = masterpos.y-13, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[5], npos)
if getThingfromPos(stone4pos) ~= 1354 then
doCreateItem(1354,1,stone4pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2009 and doCheckStone(stone6pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-22, y = masterpos.y-13, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[6], npos)
if getThingfromPos(stone5pos) ~= 1354 then
doCreateItem(1354,1,stone5pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2010 and doCheckStone(stone7pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-8, y = masterpos.y-13, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[7], npos)
if getThingfromPos(stone6pos) ~= 1354 then
doCreateItem(1354,1,stone6pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2011 and doCheckStone(stone8pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-16, y = masterpos.y-26, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[8], npos)
if getThingfromPos(stone7pos) ~= 1354 then
doCreateItem(1354,1,stone7pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2012 and doCheckStone(stone9pos) == 0 then
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-30, y = masterpos.y-26, z = masterpos.z}
local mpos = {x=npos.x, y=npos.y-4, z=npos.z}
doChange(cid, mpos, monsters[9], npos)
if getThingfromPos(stone8pos) ~= 1354 then
doCreateItem(1354,1,stone8pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2013 and doCheckStone(stone10pos) == 0 then -- leads to room ten
if getPlayerStorageValue(cid,9000) == playerID then
local npos = {x = masterpos.x-24, y = masterpos.y-39, z = masterpos.z}
local mpos = {x = npos.x, y = npos.y-4, z = npos.z}
doChange(cid, mpos, monsters[10], npos)
if getThingfromPos(stone9pos) ~= 1354 then
doCreateItem(1354,1,stone9pos)
end
else
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
setPlayerStorageValue(cid,5029,-1)
setPlayerStorageValue(cid,3002,-1)
setPlayerStorageValue(cid,2999,-1)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
end
elseif item.actionid == 2014 then
local npos = {x = masterpos.x+12, y = masterpos.y-20, z = masterpos.z-1} -- exit
if getThingfromPos(stone10pos) ~= 1354 then
doCreateItem(1354,1,stone10pos)
end
if getPlayerStorageValue(cid,5029) == 1 then -- easy mode
setPlayerStorageValue(cid,3001,2)
elseif getPlayerStorageValue(cid,5029) == 2 then -- medium mode
setPlayerStorageValue(cid,3001,3)
elseif getPlayerStorageValue(cid,5029) == 3 then -- hard mode
setPlayerStorageValue(cid,3001,4)
end
doTeleportThing(cid, npos)
doPlayerSay(cid, "Respect and honor to you, champion!", 16)
doSendMagicEffect(npos,10)
arenaOver(cid)
elseif item.actionid == 3011 then -- room to the right of the NPC this will start the time limit
if isPlayer(cid) == TRUE then --make more efficient with (and) later
if getPlayerAccess(cid) < 3 then -- makes sure the player is not a monster/GM
if getPlayerStorageValue(cid, 3002) ~= 1 or getGlobalStorageValue(3000) ~= 1 then
doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doPlayerSendTextMessage(cid, 22, "You may not log into the arena.")
arenaOver(cid)
elseif getPlayerStorageValue(cid, 2998) ~= 1 then
uniqueID = getGlobalStorageValue(9000)
local passArgs = {cid = cid, monster = monster, uniqueID = uniqueID}
addEvent(afterTimeLimit,timeLimit,passArgs)
setPlayerStorageValue(cid,2998,1)
end
end
end
elseif doCheckStone(stone10pos) == 1 then -- confused yet?
roomBusy(cid, pos)
elseif doCheckStone(stone9pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone8pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone7pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone6pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone5pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone4pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone3pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone2pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone1pos) == 1 then
roomBusy(cid, pos)
end
end
function onAddItem(moveitem, tileitem, pos)
local function doRemoveStone(stonepos)
repeat
local stone1 = getThingfromPos(stonepos)
if stone1.itemid == 1354 then
doRemoveItem(stone1.uid,1)
end
until stone1.itemid ~= 1354
end
local function doCheckBody(moveitem, stonepos, monster)
local stone = getThingfromPos(stonepos)
if (moveitem.itemid == 6324 and stone.itemid == 1354) then
doRemoveStone(stonepos)
doRemoveItem(moveitem.uid,1)
doSendMagicEffect(stonepos,2)
if getGlobalStorageValue(3000) == 1 then
doSendAnimatedText(pos,"Victory!",198)
else
doCheckStoneId(stone1pos)
doCheckStoneId(stone2pos)
doCheckStoneId(stone3pos)
doCheckStoneId(stone4pos)
doCheckStoneId(stone5pos)
doCheckStoneId(stone6pos)
doCheckStoneId(stone7pos)
doCheckStoneId(stone8pos)
doCheckStoneId(stone9pos)
doCheckStoneId(stone10pos)
end
elseif moveitem.itemid == 3058 or moveitem.itemid == 3065 then
--doRemoveItem(moveitem.uid,1) -- server needs time to add the bp and shit (i guess) to the body so we use addEvent to do it 1 second later otherwise - crash
local dPos = getThingPos(moveitem.uid)
local passArgs = {dPos = dPos}
addEvent(removeCorpse,1000,passArgs)
doCreatureAddHealth(monster,-10000)
--local pos = getThingPos(monster)
doCheckStoneId(stone1pos)
doCheckStoneId(stone2pos)
doCheckStoneId(stone3pos)
doCheckStoneId(stone4pos)
doCheckStoneId(stone5pos)
doCheckStoneId(stone6pos)
doCheckStoneId(stone7pos)
doCheckStoneId(stone8pos)
doCheckStoneId(stone9pos)
doCheckStoneId(stone10pos)
setGlobalStorageValue(3000,-1) -- if the arena is in use or not
doSetItemActionId(stone.uid,5999)
end
end
if tileitem.actionid == 3001 then
doCheckBody(moveitem, stone1pos, monster)
elseif tileitem.actionid == 3002 then
doCheckBody(moveitem, stone2pos, monster)
elseif tileitem.actionid == 3003 then
doCheckBody(moveitem, stone3pos, monster)
elseif tileitem.actionid == 3004 then
doCheckBody(moveitem, stone4pos, monster)
elseif tileitem.actionid == 3005 then
doCheckBody(moveitem, stone5pos, monster)
elseif tileitem.actionid == 3006 then
doCheckBody(moveitem, stone6pos, monster)
elseif tileitem.actionid == 3007 then
doCheckBody(moveitem, stone7pos, monster)
elseif tileitem.actionid == 3008 then
doCheckBody(moveitem, stone8pos, monster)
elseif tileitem.actionid == 3009 then
doCheckBody(moveitem, stone9pos, monster)
elseif tileitem.actionid == 3010 then
doCheckBody(moveitem, stone10pos, monster)
end
end
function after1second(passArgs) -- this will check the players position after the NPC has checked its storages and decided to tp it or not (i know its inefficient but it works and is flawless)
local Ppos = getPlayerPosition(passArgs.cid)
if (Ppos.x > masterpos.x+22) then -- player was not teleported by the NPC and doesnt need to be in that area.
doTeleportThing(passArgs.cid,{x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z})
doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10)
doPlayerSendTextMessage(passArgs.cid, 22, "Please talk to the NPC before entering the arena.")
else
local stone = getThingfromPos(stone1pos)
doSetItemActionId(stone.uid,6000)
local pos = getThingPos(stone.uid)
monster = doSummonCreature(monsters[1], {x=pos.x+5, y=pos.y-2, z=pos.z})
doSendAnimatedText(npos,"Fight!",198)
doSendMagicEffect({x=pos.x+5, y=pos.y-2, z=pos.z},10)
end
end
function removeCorpse(passArgs)
local dPos = passArgs.dPos
local body = getThingfromPos({x=dPos.x, y=dPos.y, z=dPos.z, stackpos=255}) -- FINALLY
doRemoveItem(body.uid,1)
end
function afterTimeLimit(passArgs)
doCreatureAddHealth(passArgs.monster,-10000)
end
Well, first of all. Since that's scripts for Umby server, you need to remake the script. Since like 60% of the functions on Evo differs from the ones in TFS, so you can't use those scripts. Second of all, this isn't a thread for lua help. Use the appropriate section for that.ey i got some bugs for u if u are a red skull and someone atk u he will be a yellow skull but when u kill him u will get a frag same as red skull vs red skull
btw can u help me with the script for arena ?
npc saying
23:37 Halvar: Someone is currently participating in the arena. Please wait your turn.
when i teleported into arena and into telerport to arena it backing me to the enter ...and says too that somone is there but any 1 is there because im alone on the server:S any bug in console..
arena npc.lua
Svargrond login.lua <movevents>Code:-- Umby local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false -- masterpos is the location that the player will first be teleported to. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot) local masterpos = {x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the movement script local timeLimit = 600 -- this is the time limit in seconds (600 = 10 minutes) this has to match the timeLimit in the Svargrond.lua script aswell. local arenaCost = {1000, 5000, 10000} -- this is the ammount of gp it costs to start the arena (first, second, third.) -- you shouldnt need to edit any more of the script. local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1} local npcpos = {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z} local playerID = getGlobalStorageValue(9000) 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 onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureTurn(creature) end local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out: setGlobalStorageValue(3000,-1) -- if the arena is in use or not setGlobalStorageValue(9000,-1) -- if the arena is in use or not arenaStatus = 0 arenaStatus1 = 0 setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not setPlayerStorageValue(cid,9000,-1) -- reset the player ID focus = 0 talk_start = 0 end local function arenaStartFirstLvl(cid) setGlobalStorageValue(3000,1) -- if the arena is in use or not setPlayerStorageValue(cid,5029,1) -- set the player arena status (hard med easy) setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not doTeleportThing(cid, {x=masterpos.x+24,y=masterpos.y-1,z=masterpos.z}) arenaStatus = arenaStatus1 end local function arenaStartSecondLvl(cid) setGlobalStorageValue(3000,1) -- if the arena is in use or not setPlayerStorageValue(cid,5029,2) -- set the player arena status (hard med easy) setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not doTeleportThing(cid, {x = masterpos.x+24, y = masterpos.y-1, z = masterpos.z}) arenaStatus = arenaStatus1 end local function arenaStartThirdLvl(cid) setGlobalStorageValue(3000,1) -- if the arena is in use or not setPlayerStorageValue(cid,5029,3) -- set the player arena status (hard med easy) setPlayerStorageValue(cid,3002,1) -- if the player is still in the arena or not doTeleportThing(cid, {x = masterpos.x+24, y = masterpos.y-1, z = masterpos.z}) arenaStatus = arenaStatus1 end local function doCheckStone(stonepos) local stone = getThingfromPos(stonepos) if stone.itemid ~= 1354 then doCreateItem(1354,1,stonepos) end if stone.actionid == 6000 then doSetItemActionId(stone.uid,5999) end end function onCreatureDisappear(cid, pos) if getGlobalStorageValue(3000) ~= 1 then arenaStatus = 0 arenaStatus1 = 0 setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not focus = 0 end end function onCreatureSay(cid, type, msg) msg = string.lower(msg) cname = getCreatureName(cid) if (msgcontains(msg, 'hi') and (focus == 0) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) ~= 1) then selfSay('Hello competitor! Do you want to fight in the arena or shall I explain the rules first?') talk_state = 0 arenaStatus = 0 focus = cid talk_start = os.clock() setGlobalStorageValue(3000,-1) setPlayerStorageValue(cid,5030,-1) setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not setPlayerStorageValue(cid,2998,-1) -- resets so that the time limit will start setPlayerStorageValue(cid,9000,-1) -- playerID reset so no one has the same one when they start (unless you win the lottery often) setPlayerStorageValue(cid,2999,-1) -- this makes sure the player isnt tped into the arena twice by being an idiot and stepping on the start teleport more then once in 0.5 seconds (might sound confusing) elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) == 1 and getPlayerStorageValue(cid,5029) == 1 and getPlayerStorageValue(cid,3002) > 0) then setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not selfSay('Someone is currently participating in the arena. Please wait your turn.') elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 and getGlobalStorageValue(3000) == 1) then selfSay('Someone is currently participating in the arena. Please wait your turn.') elseif (focus == cid and getPlayerStorageValue(cid,3002) < 0) then talk_start = os.clock() if msgcontains(msg, 'rules') or msgcontains(msg, 'rule') or msgcontains(msg, 'first') then selfSay('What do you want to know? Something about the three different difficulties, the general rules or the prices? Maybe you also want to know what happens when you die?') elseif msgcontains(msg, 'die') or msgcontains(msg, 'death') then selfSay('It would be better not to die! In every pit there is an emergency exit to the south. If you die in a pit... well... your corpse and backpack are gone, so enter at your own risk.') elseif msgcontains(msg, 'different') or msgcontains(msg, 'difficulties') or msgcontains(msg, 'level') or msgcontains(msg, 'lvl') then selfSay('There are three difficulties: Greenhorn, Scrapper and Warlord. On each challenge you will be confronted with ten monsters increasing in strength.') elseif talk_state == 0 and (msgcontains(msg, 'greenhorn') or msgcontains(msg, 'green') or msgcontains(msg, 'horn')) then selfSay('That is the easiest way in our arena. The fee is 1000 gold. We were setting this up for of our children to challenge some easy monsters and train them for the future.') elseif talk_state == 0 and (msgcontains(msg, 'scrapper') or msgcontains(msg, 'scrap')) then selfSay('The most common difficulty for us. The fee is 5000 gold. So if you are experienced in fighting middle class monsters this is your challenge!') elseif talk_state == 0 and (msgcontains(msg, 'warlord') or msgcontains(msg, 'war') or msgcontains(msg, 'lord')) then selfSay('Only the strongest among us will take this challenge. The fee is 10000 gold. If you pass that I promise you the respect of all citizens here. You will be a hero!') elseif msgcontains(msg, 'price') or msgcontains(msg, 'prices') or msgcontains(msg, 'cost') or msgcontains(msg, 'offer') then selfSay('The fee is 1,000/5,000/10,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack.') elseif msgcontains(msg, 'general') then selfSay('Basically you pay me a fee, and you are sent into an arena with 10 different stages. If you succeed you will be rewarded accordingly.') elseif talk_state == 1 and (msgcontains(msg, 'greenhorn') or msgcontains(msg, 'green') or msgcontains(msg, 'horn')) then if getPlayerStorageValue(cid,3001) < 2 then selfSay('The fee is 1,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the low difficulty?') arenaStatus1 = 1 doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) elseif getPlayerStorageValue(cid,3001) == 2 or getPlayerStorageValue(cid,3001) == 3 then selfSay('You have already completed the arena on this difficulty.') elseif getPlayerStorageValue(cid,3001) == 4 then selfSay('You may not enter the arena after finishing it.') end elseif talk_state == 1 and (msgcontains(msg, 'scrapper') or msgcontains(msg, 'scrap')) then if getPlayerStorageValue(cid,3001) == -1 then selfSay('You have to complete the \'Greenhorn\' difficulty before you may attempt the \'Scrapper\' difficulty.') elseif getPlayerStorageValue(cid,3001) == 3 then selfSay('You have already completed the arena on this difficulty.') elseif getPlayerStorageValue(cid,3001) == 4 then selfSay('You may not enter the arena after finishing it.') elseif getPlayerStorageValue(cid,3001) == 2 then selfSay('The fee is 5,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the medium difficulty?') arenaStatus1 = 2 doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) end elseif talk_state == 1 and (msgcontains(msg, 'warlord') or msgcontains(msg, 'war') or msgcontains(msg, 'lord')) then if getPlayerStorageValue(cid,3001) == -1 then selfSay('You have to complete the \'Greenhorn\' difficulty before you may attempt the \'Warlord\' difficulty.') elseif getPlayerStorageValue(cid,3001) == 2 then selfSay('You have to complete the \'Scrapper\' difficulty before you may attempt the \'Warlord\' difficulty.') elseif getPlayerStorageValue(cid,3001) == 4 then selfSay('You may not enter the arena after finishing it.') elseif getPlayerStorageValue(cid,3001) == 3 then selfSay('The fee is 10,000 gold for one try. Remember that if you die, it is YOUR problem and you won\'t be able to get back to your corpse and your backpack. Do you really want to participate in the arena in the high difficulty?') arenaStatus1 = 3 doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) end elseif msgcontains(msg, 'fight') or msgcontains(msg, 'start') or msgcontains(msg, 'begin') then selfSay('So you agree to the rules and want to participate in the challenge? Which difficulty do you choose, Greenhorn, Scrapper or Warlord?') talk_state = 1 elseif msgcontains(msg, 'no') then selfSay('Well get back to me when you\'d like to attempt the arena.') talk_state = 0 elseif msgcontains(msg, 'bye') then selfSay('See ya next time.') focus = 0 talk_state = 0 talk_start = 0 elseif talk_state == 1 and msgcontains(msg, 'yes') then if arenaStatus1 == 1 then --first if (doPlayerRemoveMoney(focus, arenaCost[1]) == TRUE) then selfSay('As you wish!') talk_state = 0 arenaStartFirstLvl(focus) setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP local rand = math.random(1, 15000) -- this will make the player unique hopefully setGlobalStorageValue(9000,rand) setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days else selfSay('You dont have enough gold to attempt this difficulty.') talk_state = 0 end elseif arenaStatus1 == 2 then --second if (doPlayerRemoveMoney(focus, arenaCost[2]) == TRUE) then selfSay('As you wish!') talk_state = 0 arenaStartSecondLvl(focus) setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP local rand = math.random(1, 15000) -- this will make the player unique hopefully setGlobalStorageValue(9000,rand) setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days else selfSay('You dont have enough gold to attempt this difficulty.') talk_state = 0 end elseif arenaStatus1 == 3 then --third if (doPlayerRemoveMoney(focus, arenaCost[3]) == TRUE) then selfSay('As you wish!') talk_state = 0 arenaStartThirdLvl(focus) setGlobalStorageValue(3001,-1) -- this will turn to 1 and make the NPC tp the player in when they step on the entrance TP local rand = math.random(1, 15000) -- this will make the player unique hopefully setGlobalStorageValue(9000,rand) setPlayerStorageValue(cid,9000,(getGlobalStorageValue(9000))) -- i cant believe it was so easy and i wasted 3 days else selfSay('You dont have enough gold to attempt this difficulty.') talk_state = 0 end end end end end function onThink() doNpcSetCreatureFocus(focus) if focus > 0 then if (getGlobalStorageValue(3001) == 1 and getPlayerStorageValue(focus,5030) == 1) then -- this is going to be what teleports the player into the arena to make sure that no one gets in without the NPC's focus also makes sure the player stepped on the teleport and not someone else doTeleportThing(focus, {x = masterpos.x, y = masterpos.y, z = masterpos.z}) doSendMagicEffect({x = masterpos.x, y = masterpos.y, z = masterpos.z},10) setGlobalStorageValue(3001,-1) setPlayerStorageValue(focus,5030,-1) elseif (getPlayerStorageValue(focus,3002) == 1 and (os.clock() - talk_start) > timeLimit) then -- player ran out of time while in the arena doTeleportThing(focus, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) doPlayerSendTextMessage(focus, 22, "Time is up! Sorry, you took too long. Thanks and Good luck next time!") arenaOver(focus) elseif (getGlobalStorageValue(3000) ~= 1 and arenaStatus ~= nil and arenaStatus > 0) then -- this is a backup and will make sure to set the focus to 0 after the player completes the arena. doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) arenaOver(focus) elseif (getGlobalStorageValue(3000) == 1 and getPlayerByName(getPlayerName(focus)) == 0) then -- player must have logged out while in the arena doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) setGlobalStorageValue(3000,-1) -- if the arena is in use or not arenaStatus = 0 arenaStatus1 = 0 focus = 0 elseif (arenaStatus > 0 and getPlayerStorageValue(focus, 3002) == -1) then -- this is a backup doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) arenaOver(focus) elseif (getGlobalStorageValue(3000) == 1 and (((npcpos.x-getPlayerPosition(focus).x) > 85) or ((npcpos.x-getPlayerPosition(focus).x) < -30) or ((npcpos.y-getPlayerPosition(focus).y) > 50) or ((npcpos.y-getPlayerPosition(focus).y) < -13) or (getPlayerPosition(focus).z ~= npcpos.z))) then -- player must have been teleported out ( will not remove the monster if u tp the player out so dont) doCheckStone(stone1pos) doCheckStone(stone2pos) doCheckStone(stone3pos) doCheckStone(stone4pos) doCheckStone(stone5pos) doCheckStone(stone6pos) doCheckStone(stone7pos) doCheckStone(stone8pos) doCheckStone(stone9pos) doCheckStone(stone10pos) end end end
Svargrond.lua <movements>Code:-- Umby -- masterpos is the location that the player will first be teleported to. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot) local masterpos = {x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the NPC script -- you shouldnt need to edit any more of the script. local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1} function onStepIn(cid, item, pos) playerID = getGlobalStorageValue(9000) local function doCheckStoneId(stonepos) local stone = getThingfromPos(stonepos) if stone.itemid ~= 1354 then doCreateItem(1354,1,stonepos) end if stone.actionid == 6000 then doSetItemActionId(stone.uid,5999) end end local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out: setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- player should be in the arena or not setPlayerStorageValue(cid,2999,-1) -- dont mind this (addEvent) end if (item.actionid >= 3001 and item.actionid <= 3010) then if isPlayer(cid) == TRUE then --make more efficient with (and) later if getPlayerAccess(cid) < 3 then -- makes sure the player is not a monster/GM if (getPlayerStorageValue(cid, 3002) ~= 1 or getGlobalStorageValue(3000) ~= 1) then -- player is not supposed to be in arena and must have logged in doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") arenaOver(cid) elseif (getPlayerStorageValue(cid, 9000) ~= playerID) then -- this means the player probably logged off and waited for someone else to start the arena, then logged in. (its gotta be flawless!) doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doPlayerSendTextMessage(cid, 22, "You are not supposed to be in the arena at the moment.") arenaOver(cid) end end elseif (isCreature(cid) == TRUE and getGlobalStorageValue(3000) ~= 1) then -- if the timer runs out this will remove the creature doCreatureAddHealth(cid,-10000) doCheckStoneId(stone1pos) doCheckStoneId(stone2pos) doCheckStoneId(stone3pos) doCheckStoneId(stone4pos) doCheckStoneId(stone5pos) doCheckStoneId(stone6pos) doCheckStoneId(stone7pos) doCheckStoneId(stone8pos) doCheckStoneId(stone9pos) doCheckStoneId(stone10pos) end end end
Code:-- Svargrond Arena by Arthur1408 -- masterpos É A LOCAçao do primeiro lugar que o player será teletransportado. It is TWO squares south of the MIDDLE of the FIRST room (see screen shot) local masterpos ={x=32300, y=31154, z=7, stackpos=1} -- this must match the position in the NPC script local timeLimit = 600 -- this is the time limit in seconds (600 = 10 minutes) this has to match the timeLimit in the arenaNPC.lua script aswell. -- you shouldnt need to edit any more of the script. local stone1pos = {x = masterpos.x-5, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone2pos = {x = masterpos.x-19, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone3pos = {x = masterpos.x-33, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone4pos = {x = masterpos.x-47, y = masterpos.y-2, z = masterpos.z, stackpos = 1} local stone5pos = {x = masterpos.x-41, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone6pos = {x = masterpos.x-27, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone7pos = {x = masterpos.x-13, y = masterpos.y-15, z = masterpos.z, stackpos = 1} local stone8pos = {x = masterpos.x-21, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone9pos = {x = masterpos.x-35, y = masterpos.y-28, z = masterpos.z, stackpos = 1} local stone10pos = {x = masterpos.x-29, y = masterpos.y-41, z = masterpos.z, stackpos = 1} local function doCheckStoneId(stonepos) local stone = getThingfromPos(stonepos) if stone.itemid ~= 1354 then doCreateItem(1354,1,stonepos) end if stone.actionid == 6000 then doSetItemActionId(stone.uid,5999) end end local function doChange(cid, pos, creature, tpos) local stone = getThingfromPos(pos) doSetItemActionId(stone.uid,6000) local pos = getThingPos(stone.uid) monster = doSummonCreature(creature, pos) doTeleportThing(cid,tpos) doSendAnimatedText(tpos,"Fight!",198) doSendMagicEffect(pos,10) end function onStepIn(cid, item, pos) playerID = getGlobalStorageValue(9000) local function arenaOver(cid) -- if the player leaves, dies, logs out, wins, or is teleported out: setGlobalStorageValue(3000,-1) -- if the arena is in use or not setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not setPlayerStorageValue(cid,2999,-1) -- dont mind this (addEvent) end local function doCheckLvl(cid, storage) if getPlayerStorageValue(cid, storage) == 1 then -- easy monsters = {"Frostfur", "Bloodpaw", "Bovinus", "Achad", "Colerian the Barbarian", "The Hairy One", "Axeitus Headbanger", "Rocky", "Cursed Gladiator", "Orcus the Cruel"} elseif getPlayerStorageValue(cid, storage) == 2 then -- medium monsters = {"Avalanche", "Kreebosh the Exile", "The Dark Dancer", "The Hag", "Slim", "Grimgor Guteater", "Drasilla", "Spirit of Earth", "Spirit of Water", "Spirit of Fire"} elseif getPlayerStorageValue(cid, storage) == 3 then -- hard monsters = {"Webster", "Darakan the Executioner", "Norgle Glacierbeard", "The Pit Lord", "Svoren The Mad", "The Masked Marauder", "Gnorre Chyllson", "Fallen Mooh'Tah Master Ghar", "Deathbringer", "The Obliverator"} end end local function doCheckStone(stonepos) local stone = getThingfromPos(stonepos) if stone.actionid ~= 6000 and stone.itemid == 1354 then return 0 elseif stone.actionid == 6000 or stone.itemid ~= 1354 then return 1 end end local function roomBusy(cid, pos) doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doSendMagicEffect(pos,10) doPlayerSendTextMessage(cid, 22, "The arena is in use right now, wait your turn!") end doCheckLvl(cid, 5029) if item.actionid == 2002 then doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doCheckStoneId(stone1pos) doCheckStoneId(stone2pos) doCheckStoneId(stone3pos) doCheckStoneId(stone4pos) doCheckStoneId(stone5pos) doCheckStoneId(stone6pos) doCheckStoneId(stone7pos) doCheckStoneId(stone8pos) doCheckStoneId(stone9pos) doCheckStoneId(stone10pos) arenaOver(cid) doCreatureAddHealth(monster,-10000) -- might give an error if someone leaves after the monster is dead elseif item.actionid == 2003 then -- tp leading from the reward room to the NPC area doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) elseif item.actionid == 2004 and doCheckStone(stone1pos) == 0 then -- from the npc room, teleports you to room one if (getGlobalStorageValue(3000) == 1 and hasAddedEvent ~= 1) then local passArgs = {cid=cid, npos=npos} setPlayerStorageValue(cid,5030,1) setGlobalStorageValue(3001,1) local npos = masterpos if getPlayerStorageValue(cid,2999) == -1 then addEvent(after1second,1000,passArgs) setPlayerStorageValue(cid,2999,1) end else -- player was tped past the exp doors or logged in there or something doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doPlayerSendTextMessage(cid, 22, "Please talk to the NPC before entering the arena.") setPlayerStorageValue(cid,5029,-1) -- reset the player arena status (hard med easy) setPlayerStorageValue(cid,3002,-1) -- if the player is still in the arena or not end elseif item.actionid == 2005 and doCheckStone(stone2pos) == 0 then -- this takes you to room 2 if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-14, y = masterpos.y, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[2], npos) if getThingfromPos(stone1pos) ~= 1354 then doCreateItem(1354,1,stone1pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2006 and doCheckStone(stone3pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-28, y = masterpos.y, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[3], npos) if getThingfromPos(stone2pos) ~= 1354 then doCreateItem(1354,1,stone2pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2007 and doCheckStone(stone4pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-42, y = masterpos.y, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[4], npos) if getThingfromPos(stone3pos) ~= 1354 then doCreateItem(1354,1,stone3pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2008 and doCheckStone(stone5pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-36, y = masterpos.y-13, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[5], npos) if getThingfromPos(stone4pos) ~= 1354 then doCreateItem(1354,1,stone4pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2009 and doCheckStone(stone6pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-22, y = masterpos.y-13, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[6], npos) if getThingfromPos(stone5pos) ~= 1354 then doCreateItem(1354,1,stone5pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2010 and doCheckStone(stone7pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-8, y = masterpos.y-13, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[7], npos) if getThingfromPos(stone6pos) ~= 1354 then doCreateItem(1354,1,stone6pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2011 and doCheckStone(stone8pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-16, y = masterpos.y-26, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[8], npos) if getThingfromPos(stone7pos) ~= 1354 then doCreateItem(1354,1,stone7pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2012 and doCheckStone(stone9pos) == 0 then if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-30, y = masterpos.y-26, z = masterpos.z} local mpos = {x=npos.x, y=npos.y-4, z=npos.z} doChange(cid, mpos, monsters[9], npos) if getThingfromPos(stone8pos) ~= 1354 then doCreateItem(1354,1,stone8pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2013 and doCheckStone(stone10pos) == 0 then -- leads to room ten if getPlayerStorageValue(cid,9000) == playerID then local npos = {x = masterpos.x-24, y = masterpos.y-39, z = masterpos.z} local mpos = {x = npos.x, y = npos.y-4, z = npos.z} doChange(cid, mpos, monsters[10], npos) if getThingfromPos(stone9pos) ~= 1354 then doCreateItem(1354,1,stone9pos) end else doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) setPlayerStorageValue(cid,5029,-1) setPlayerStorageValue(cid,3002,-1) setPlayerStorageValue(cid,2999,-1) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") end elseif item.actionid == 2014 then local npos = {x = masterpos.x+12, y = masterpos.y-20, z = masterpos.z-1} -- exit if getThingfromPos(stone10pos) ~= 1354 then doCreateItem(1354,1,stone10pos) end if getPlayerStorageValue(cid,5029) == 1 then -- easy mode setPlayerStorageValue(cid,3001,2) elseif getPlayerStorageValue(cid,5029) == 2 then -- medium mode setPlayerStorageValue(cid,3001,3) elseif getPlayerStorageValue(cid,5029) == 3 then -- hard mode setPlayerStorageValue(cid,3001,4) end doTeleportThing(cid, npos) doPlayerSay(cid, "Respect and honor to you, champion!", 16) doSendMagicEffect(npos,10) arenaOver(cid) elseif item.actionid == 3011 then -- room to the right of the NPC this will start the time limit if isPlayer(cid) == TRUE then --make more efficient with (and) later if getPlayerAccess(cid) < 3 then -- makes sure the player is not a monster/GM if getPlayerStorageValue(cid, 3002) ~= 1 or getGlobalStorageValue(3000) ~= 1 then doTeleportThing(cid, {x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doPlayerSendTextMessage(cid, 22, "You may not log into the arena.") arenaOver(cid) elseif getPlayerStorageValue(cid, 2998) ~= 1 then uniqueID = getGlobalStorageValue(9000) local passArgs = {cid = cid, monster = monster, uniqueID = uniqueID} addEvent(afterTimeLimit,timeLimit,passArgs) setPlayerStorageValue(cid,2998,1) end end end elseif doCheckStone(stone10pos) == 1 then -- confused yet? roomBusy(cid, pos) elseif doCheckStone(stone9pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone8pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone7pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone6pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone5pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone4pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone3pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone2pos) == 1 then roomBusy(cid, pos) elseif doCheckStone(stone1pos) == 1 then roomBusy(cid, pos) end end function onAddItem(moveitem, tileitem, pos) local function doRemoveStone(stonepos) repeat local stone1 = getThingfromPos(stonepos) if stone1.itemid == 1354 then doRemoveItem(stone1.uid,1) end until stone1.itemid ~= 1354 end local function doCheckBody(moveitem, stonepos, monster) local stone = getThingfromPos(stonepos) if (moveitem.itemid == 6324 and stone.itemid == 1354) then doRemoveStone(stonepos) doRemoveItem(moveitem.uid,1) doSendMagicEffect(stonepos,2) if getGlobalStorageValue(3000) == 1 then doSendAnimatedText(pos,"Victory!",198) else doCheckStoneId(stone1pos) doCheckStoneId(stone2pos) doCheckStoneId(stone3pos) doCheckStoneId(stone4pos) doCheckStoneId(stone5pos) doCheckStoneId(stone6pos) doCheckStoneId(stone7pos) doCheckStoneId(stone8pos) doCheckStoneId(stone9pos) doCheckStoneId(stone10pos) end elseif moveitem.itemid == 3058 or moveitem.itemid == 3065 then --doRemoveItem(moveitem.uid,1) -- server needs time to add the bp and shit (i guess) to the body so we use addEvent to do it 1 second later otherwise - crash local dPos = getThingPos(moveitem.uid) local passArgs = {dPos = dPos} addEvent(removeCorpse,1000,passArgs) doCreatureAddHealth(monster,-10000) --local pos = getThingPos(monster) doCheckStoneId(stone1pos) doCheckStoneId(stone2pos) doCheckStoneId(stone3pos) doCheckStoneId(stone4pos) doCheckStoneId(stone5pos) doCheckStoneId(stone6pos) doCheckStoneId(stone7pos) doCheckStoneId(stone8pos) doCheckStoneId(stone9pos) doCheckStoneId(stone10pos) setGlobalStorageValue(3000,-1) -- if the arena is in use or not doSetItemActionId(stone.uid,5999) end end if tileitem.actionid == 3001 then doCheckBody(moveitem, stone1pos, monster) elseif tileitem.actionid == 3002 then doCheckBody(moveitem, stone2pos, monster) elseif tileitem.actionid == 3003 then doCheckBody(moveitem, stone3pos, monster) elseif tileitem.actionid == 3004 then doCheckBody(moveitem, stone4pos, monster) elseif tileitem.actionid == 3005 then doCheckBody(moveitem, stone5pos, monster) elseif tileitem.actionid == 3006 then doCheckBody(moveitem, stone6pos, monster) elseif tileitem.actionid == 3007 then doCheckBody(moveitem, stone7pos, monster) elseif tileitem.actionid == 3008 then doCheckBody(moveitem, stone8pos, monster) elseif tileitem.actionid == 3009 then doCheckBody(moveitem, stone9pos, monster) elseif tileitem.actionid == 3010 then doCheckBody(moveitem, stone10pos, monster) end end function after1second(passArgs) -- this will check the players position after the NPC has checked its storages and decided to tp it or not (i know its inefficient but it works and is flawless) local Ppos = getPlayerPosition(passArgs.cid) if (Ppos.x > masterpos.x+22) then -- player was not teleported by the NPC and doesnt need to be in that area. doTeleportThing(passArgs.cid,{x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z}) doSendMagicEffect({x = masterpos.x+21, y = masterpos.y-2, z = masterpos.z},10) doPlayerSendTextMessage(passArgs.cid, 22, "Please talk to the NPC before entering the arena.") else local stone = getThingfromPos(stone1pos) doSetItemActionId(stone.uid,6000) local pos = getThingPos(stone.uid) monster = doSummonCreature(monsters[1], {x=pos.x+5, y=pos.y-2, z=pos.z}) doSendAnimatedText(npos,"Fight!",198) doSendMagicEffect({x=pos.x+5, y=pos.y-2, z=pos.z},10) end end function removeCorpse(passArgs) local dPos = passArgs.dPos local body = getThingfromPos({x=dPos.x, y=dPos.y, z=dPos.z, stackpos=255}) -- FINALLY doRemoveItem(body.uid,1) end function afterTimeLimit(passArgs) doCreatureAddHealth(passArgs.monster,-10000) end
local focus = 0
local talk_start = 0
local target = 0
local days = 0
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
npcHandler:say('Hello ' .. creatureGetName(cid) .. '! I sell the 2nd promotions.')
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
npcHandler:say('Hello ' I sell the 2nd promotions.',cid)
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
npcHandler:say('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.',cid)
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'promotion') or msgcontains(msg, 'promote') then
if getPlayerVocation(cid) > 8 then
npcHandler:say('Sorry, you are already promoted.',cid)
talk_state = 0
elseif getPlayerLevel(cid) < 80 then
npcHandler:say('Sorry, you need level 80 to buy the second promotion.',cid)
talk_state = 0
elseif not getPlayerPremium(cid) then
npcHandler:say('Sorry, you must have the first promotion to buy the second promotion.',cid)
talk_state = 0
else
npcHandler:say('Do you want to buy promotion for 500k?',cid)
talk_state = 1
end
elseif talk_state == 1 then
if msgcontains(msg, 'yes') then
if pay(cid,500000) then
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
npcHandler:say('You are now promoted!',cid)
else
npcHandler:say('Sorry, you do not have enough money.',cid)
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
npcHandler:say('Good bye, ' .. creatureGetName(cid) .. '!',cid)
focus = 0
talk_start = 0
end
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
npcHandler:say('Next Please...',cid)
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
npcHandler:say('Good bye then.',cid)
focus = 0
end
end
end