NPC: Upgrade Skills

smoochy boys on tour

Yenye

LOMCN n00bie
Apr 15, 2009
4
0
12
I'm very bad in script but with help i tried to make a npc for upgrade skills, asking class, skill lvl...

My problem is that the npc doesn't start, here is the script but isn't finished.

And i have very problems on the red zone.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@MagLevelInt]
{
#if
#say
Este servicio permite aumentar el nivel de tus magias.\
{FCOLOR/10}El coste dependera de la subida que desees.{FCOLOR/12}\
Que clase eres?\\
<[Guerrero]/@StartWarMag>
<[Mago]/@StartWizMag>
<[Taoista]/@StartTaoMag>
#ELSESAY
Tienes que ser minimo nivel {FCOLOR/10}40{FCOLOR/12} para\
utilizar este servicio.\\
<[Volver]/@main>

[@StartWarMag]
#IF
#SAY
Selecciona el nivel al que deseas aumentar la magia.\

<Subir Magia a Nivel 6/@UpWarSkill6>\
<Subir Magia a Nivel 7/@UpWarSkill7>\
<Subir Magia a Nivel 8/@UpWarSkill8>\
<Subir Magia a Nivel 9/@UpWarSkill9>\

[@UpWarSkill6]
#IF
#SAY
Que magia deseas subir?\

<SwordmanShip/@Slaying6>\ <Slaying/@UpSlayingwar6>\
<AdvancedSlay/@UpAdvwar6>\ <HalfMoon/@UpHalfwar6>\
<ShoulderDash/@UpDashwar6>\ <FlamingSword/@UpFlamwar6>\
<DragonRise/@UpDragonwar6>\ <BladeStorm/@UpBladewar6>\
<DestructSurge/@UpDSurgewar6>\ <Interchange/@UpInterwar6>\
<Defiance/@UpDefiancewar6>\ <Beacon/@UpBeaconwar6>\
<Might/@UpMightwar6>\ <Assault/@UpAssaultwar6>\

[@Slaying6]
#ACT
MOV A4 %SLAYING6
goto @UpSlaying6

[@UpSlaying6]
#if
CHKMAGICLEVEL %A4 5
HLSCRIPTCMD CHECKPOINT 500
#act
HLSCRIPTCMD SETPOINT - 500
HLSCRIPTCMD CHANGEMAGLEVEL %A4 6
#SAY
Tu magia ha aumentado a nivel 6, dispones de {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales.\
<[Volver]/@main>\

#ELSESAY
Se ha producido un error, comprueba que dispongas de los\
requisitos minimos para utilizar este servicio.\\
 

greatbat

Dedicated Member
Dedicated Member
Sep 8, 2007
13
0
47
[@MagLevelInt]
{ << Need only if scritp is called by #CALL
#if
#say
Este servicio permite aumentar el nivel de tus magias.\
{FCOLOR/10}El coste dependera de la subida que desees.{FCOLOR/12}\
Que clase eres?\\
<[Guerrero]/@StartWarMag>
<[Mago]/@StartWizMag>
<[Taoista]/@StartTaoMag>
#ELSESAY
Tienes que ser minimo nivel {FCOLOR/10}40{FCOLOR/12} para\
utilizar este servicio.\\
<[Volver]/@main>

[@StartWarMag]
#IF
#SAY
Selecciona el nivel al que deseas aumentar la magia.\

<Subir Magia a Nivel 6/@UpWarSkill6>\
<Subir Magia a Nivel 7/@UpWarSkill7>\
<Subir Magia a Nivel 8/@UpWarSkill8>\
<Subir Magia a Nivel 9/@UpWarSkill9>\

[@UpWarSkill6]
#IF
#SAY
Que magia deseas subir?\

<SwordmanShip/@Slaying6>\ <Slaying/@UpSlayingwar6>\
<AdvancedSlay/@UpAdvwar6>\ <HalfMoon/@UpHalfwar6>\
<ShoulderDash/@UpDashwar6>\ <FlamingSword/@UpFlamwar6>\
<DragonRise/@UpDragonwar6>\ <BladeStorm/@UpBladewar6>\
<DestructSurge/@UpDSurgewar6>\ <Interchange/@UpInterwar6>\
<Defiance/@UpDefiancewar6>\ <Beacon/@UpBeaconwar6>\
<Might/@UpMightwar6>\ <Assault/@UpAssaultwar6>\

[@Slaying6]
#ACT
MOV A4 %SLAYING6 <<<< Should be MOV A4 "Slaying"
goto @UpSlaying6

[@UpSlaying6]
#if
CHKMAGICLEVEL %A4 5
HLSCRIPTCMD CHECKPOINT 500
#act
HLSCRIPTCMD SETPOINT - 500
HLSCRIPTCMD CHANGEMAGLEVEL %A4 6
#SAY
Tu magia ha aumentado a nivel 6, dispones de {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales.\
<[Volver]/@main>\

#ELSESAY
Se ha producido un error, comprueba que dispongas de los\
requisitos minimos para utilizar este servicio.\\


Now the script should work but it will be kinda big if you will do it that way, somewhere round 800 lines ?

Try this one, should work the same and it will be much shorter.

Code:
[@MagLevelInt]
#IF
#SAY
Selecciona el nivel al que deseas aumentar la magia.\
<Subir Magia a Nivel 6 /@UpLvSkill(6,500)>\
<Subir Magia a Nivel 7 /@UpLvSkill(7,600)>\
<Subir Magia a Nivel 8 /@UpLvSkill(8,700)>\
<Subir Magia a Nivel 9 /@UpLvSkill(9,800)>\
#ELSESAY
Tienes que ser minimo nivel {FCOLOR/10}40{FCOLOR/12} para\
utilizar este servicio.\\
<[Volver]/@main>
 
[@UpLvSkill()]
#IF
#ACT
MOV D1 %ARG(1)
MOV D3 %ARG(2)
MOV D2 %D1
DEC D2 1
 
#IF
checkjob warrior
#SAY
Que magia deseas subir?\
<SwordmanShip /@UpSkill(SwordmanShip)>\ <Slaying /@UpSkill(Slaying)>\
<AdvancedSlay /@UpSkill(AdvancedSlay)>\ <HalfMoon /@UpSkill(HalfMoon)>\
<ShoulderDash /@UpSkill(ShoulderDash)>\ <FlamingSword /@UpSkill(FlamingSword)>\
<DragonRise /@UpSkill(DragonRise)>\ <BladeStorm /@UpSkill(BladeStorm)>\
<DestructSurge /@UpSkill(DestructSurge)>\ <Interchange /@UpSkill(Interchange)>\
<Defiance /@UpSkill(Defiance)>\ <Beacon /@UpSkill(Beacon)>\
<Might /@UpSkill(Might)>\ <Assault /@UpSkill(Assault)>\
 
#IF
checkjob wizard
#SAY
Wiz skills
<FireWall/@UpSkill(FireWall)>
 
#IF
checkjob taoist
#SAY
Tao skills
 
[@UpSkill()]
#IF
#ACT
MOV A4 %ARG(1)
 
#IF
CHKMAGICLEVEL %A4 %D2
HLSCRIPTCMD CHECKPOINT %D3
#ACT
HLSCRIPTCMD SETPOINT - %D3
HLSCRIPTCMD CHANGEMAGLEVEL %A4 %D1
#SAY
Tu magia ha aumentado a nivel <$OUTPUT(D1)>, dispones de {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales.\
<[Volver]/@main>\
#ELSESAY
Se ha producido un error, comprueba que dispongas de los\
requisitos minimos para utilizar este servicio.\\

Using this code:
- only one @upskill and @UpLvSkill for all classes and skills
- War/Wiz/Tao will see only their class skills
- remeber to add "{" "}" if script is called by #CALL
- @UpLvSkill(6,500) 2nd number is the integral cost

Script not tested but should work.
 
Last edited:
Upvote 0