Spell/Skill upgrade NPC script
This can of course be edited/adapted to what you need:
;;Sean script npc
[@main]
#Say
Which service do you require?\
<Spell Upgrades/@spellsup>\
<Exit/@exit>
[@spellsup]
#SAY
To upgrade a skill You need 6 Goldore,\
50,000 Gold and to comply with the lvl requirement.\
Do you have what is needed to upgrade?\
<Yes/@checkclass> <No/@exit>
[@checkclass]
#If
checkjob taoist
#ACT
goto @skilluptao
#if
checkjob wizard
#ACT
goto @skillupwiz
#if
checkjob warrior
#ACT
goto @skillupwar
[@skilluptao]
#say
Which skill to you want to level?\
<Healing/@upspell(Healing,14,17)> <SpiritSword/@upspell(SpiritSword,15,18)>\
<Poisoning/@upspell(Poisoning,19,22)> <TaoExplosion/@upspell(TaoExplosion,20,23)>\
<EvilSlayer/@upspell(EvilSlayer,21,24)> <SummonSkele/@upspell(SummonSkele,24,27)>\
<Invisibility/@upspell(Invisibility,27,30)> <MagicProtect/@upspell(MagicProtect,28,31)>\
<MassInvis/@upspell(MassInvis,30,33)> <GtEvilSlayer/@upspell(GtEvilSlayer,31,34)>\
<Resilience/@upspell(Resilience,32,35)> <TrapOctagon/@upspell(TrapOctagon,34,37)>\
<CombatKick/@upspell(CombatKick,35,38)> <ElementalSup/@upspell(ElementalSup,36,39)>\
<SummonWraith/@upspell(SummonWraith,37,40)> <MassHealing/@upspell(MassHealing,38,41)>\
<SummonShinsu/@upspell(SummonShinsu,40,43)> <BloodLust/@upspell(BloodLust,41,44)>\
<Resurrection/@upspell(Resurrection,42,45)> <Purification/@upspell(Purification,47,50)>\
<Strength/@upspell(Strength,47,50)> <Transparency/@upspell(Transparency,50,43)>\
<Celestial/@upspell(Celestial,53,56)> <GtExplosion/@upspell(GtExplosion,55,57)>
[@skillupwiz]
#SAY
Which skill to you want to level?\
<FireBall/@upspell(FireBall,14,17)> <LightninBall/@upspell(LightninBall,15,18)>\
<IceBall/@upspell(IceBall,16,19)> <PowerBurst/@upspell(PowerBurst,17,20)>\
<FlameRepulse/@upspell(FlameRepulse,19,22)> <Stunning/@upspell(Stunning,20,1000)>\
<Teleport/@upspell(Teleport,21,24)> <AdamantineFB/@upspell(AdamantineFB,22,25)>\
<LightninBolt/@upspell(LightninBolt,23,26)> <IceBlades/@upspell(IceBlades,24,27)>\
<GtPowerBurst/@upspell(GtPowerBurst,25,28)> <ScorchEarth/@upspell(ScorchEarth,27,30)>\
<LightninBeam/@upspell(LightninBeam,28,31)> <FrozenEarth/@upspell(FrozenEarth,29,32)>\
<BlowEarth/@upspell(BlowEarth,30,33)> <FireCloud/@upspell(FireCloud,31,34)>\
<TurnUndead/@upspell(TurnUndead,33,36)> <GeoManip/@upspell(GeoManip,34,37)>\
<MagicShield/@upspell(MagicShield,37,40)> <Explosion/@upspell(Explosion,39,42)>\
<LightningFlo/@upspell(LightningFlo,40,43)> <IceStorm/@upspell(IceStorm,41,44)>\
<DragonRise/@upspell(DragonRise,42,45)> <DragonTorn/@upspell(DragonTorn,42,45)>\
<GtFrozenEarth/@upspell(GtFrozenEarth,47,50)> <ChainLight/@upspell(ChainLight,47,50)>\
<MeteorShower/@upspell(MeteorShower,50,53)> <Renounce/@upspell(Renounce,53,56)>
<Tempest/@upspell(Tempest,55,57)>
[@skillupwar]
#SAY
Which skill to you want to level?\
<SwordmanShip/@upspell(SwordmanShip,14,17)>\
<Slaying/@upspell(Slaying,21,24)>\
<AdvancedSlay/@upspell(AdvancedSlay,26,29)>\
<HalfMoon/@upspell(HalfMoon,31,34)>\
<ShoulderDash/@upspell(ShoulderDash,34,37)>\
<FlamingSword/@upspell(FlamingSword,39,42)>\
<BladeStorm/@upspell(BladeStorm,45,48)>\
<DSurge/@upspell(DSurge,49,52)>\
<Interchange/@upspell(Interchange,51,54)>\
<Defiance/@upspell(Defiance,53,57)>\
<Beacon/@upspell(Beacon,55,58)>\
<Might/@upspell(Might,57,60)>\
<Assault/@upspell(Assault,59,61)>\
[@upspell()]
#ACT
MOV A1 %ARG(1)
MOV D1 %ARG(2)
MOV D2 %ARG(3)
#SAY
Upgrade spell to which level?\
<Level 4/@skillupg(4)>\
<Level 5/@skillupg(5)>
[@skillupg()]
#ACT
Mov D3 %arg(1)
#If
EQUAL d3 4
#act
goto @skillup2
#if
equal d3 5
#act
goto @skillup2a
[@skillup2]
#IF
CHKMAGICLEVEL %A1 3
!CHKMAGICLEVEL %A1 4
CHECKLEVEL %D1
#act
goto @skillup3
#ELSESAY
I can't do that, check you have what is required
[@skillup2a]
#IF
CHKMAGICLEVEL %A1 4
!CHKMAGICLEVEL %A1 5
CHECKLEVEL %D2
#ACT
goto @skillup3
#ELSESAY
I can't do that, check you have what is required
[@skillup3]
#IF
checkitem goldore 6
checkgold 50000
#ELSESAY
I can't do that, check you have what is required.
#ACT
HLSCRIPTCMD CHANGEMAGLEVEL %A1 %D3
Take gold 50000
TAKE goldore 6
#SAY
Congratulations <$output(A1)> increased to level <$output(D3)>\
<EXIT/@exit>