NPCfor levelling skills

smoochy boys on tour

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
I've made an npc for levelling skills, but I was wondering how would I make it work like the auto reincarnation script?

Would the HLCSRIPTCMD bit still work with an auto script? My script so far:


[@getSlayingleveled]
#SAY
Choose a level of Slaying you would like to obtain? \
<Slaying Level 6 - level 60 - 50k FP - 50mill Gold. /@Slayingautoleveled (6,60,50000,50000000)>\
<Slaying Level 7 - level 70 - 60k FP - 70mill Gold. /@Slayingautoleveled (7,70,60000,70000000)>\
<Slaying Level 8 - level 80 - 70k FP - 90mill Gold. /@Slayingautoleveled (8,80,70000,90000000)>\
<Slaying Level 9 - level 90 - 90k FP - 110mill Gold. /@Slayingautoleveled (9,90,90000,110000000)>\
<Slaying Level 10 - level 100 - 100k FP - 130mill Gold. /@Slayingautoleveled (10,100,100000,130000000)>\\

[@slayingautoleveled()]
#ACT
Mov D5 %ARG(1)
Mov D6 %ARG(2)
Mov D4 %ARG(3)
Mov D8 %ARG(4)
goto @doslaying

[@doslaying]
#IF
ELARGE D4 %D6
checkgold %D8
checklevel %D0
!HLSCRIPTCMD CHKMAGICLEVEL %D5
#ACT
DEC D4 %D6
SetFame %D4
take gold %D8
Mov A1 "Slaying"
Mov D1 %D5
HLSCRIPTCMD CHANGEMAGLEVEL %A1 %D1
#SAY
You're Slaying is now at level <$OUTPUT(D5)>\
<Exit/@exit>\
#ELSESAY
You are missing something to raise this skill level.\
<Exit/@exit>\
 
Last edited:

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
You need the script to say that the current magic level is 5 (for the first line/option) but not 6, the script above doesn't do this.

try (where A1 = skill name)

#IF
CHKMAGICLEVEL %A1 3
!CHKMAGICLEVEL %A1 4

You also havn't told the script you are looking for Slaying as the skill to level.

You havn't defined D4?

I personally can't read the script as it's incomplete, sorry :)

Try this to help you :

http://www.lomcn.co.uk/forum/showthread.php?p=667216#post667216 :)
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
thanks for that. would it work with different variables for the gold and fp rather than gold and gold ore? i.e.

<SwordmanShip/@upspell(SwordmanShip,14,17,50000,50000000)>\

[@upspell()]
#ACT
MOV A1 %ARG(1)
MOV D1 %ARG(2)
MOV D2 %ARG(3)
MOV D3 %ARG(4)
MOV D4 %ARG(5)
#SAY
Upgrade spell to which level?\
<Level 4/@skillupg(6)>\
<Level 5/@skillupg(7)>

[@skillupg()]
#ACT
Mov D5 %arg(1)
#If
EQUAL d5 5
#act
goto @skillup2
#if
equal d5 6
#act
goto @skillup2a


[@skillup2]
#IF
CHKMAGICLEVEL %A1 4
!CHKMAGICLEVEL %A1 5
CHECKLEVEL %D1
#act
goto @skillup3
#ELSESAY
I can't do that, check you have what is required

[@skillup2a]
#IF
CHKMAGICLEVEL %A1 5
!CHKMAGICLEVEL %A1 6
CHECKLEVEL %D2
#ACT
goto @skillup3
#ELSESAY
I can't do that, check you have what is required


[@skillup3]
#IF
ELARGE D3 %D3
checkgold %D4
#ELSESAY
I can't do that, check you have what is required.
#ACT
HLSCRIPTCMD CHANGEMAGLEVEL %A1 %D5
Take gold %D4
SetFame %D3
#SAY
Congratulations <$output(A1)> increased to level <$output(D5)>\
<EXIT/@exit>

Would that work for instance?
 
Last edited:
Upvote 0

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
Given the correct scripting yes it will work with many things

#IF
ELARGE D3 %D3

that part of script must be wrong. :)

#IF
CheckFame
#ACT
Mov D4 %P9 {P9 being = to the checked fame number}
INC D4 1 or DEC D4 1
SetFame %D4

The above is how I alter fame total.
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
Ok, so if I made all the diff parts like this, then my full script should work??

<SwordmanShip/@upspell(SwordmanShip,14,17,50000;FP;,50000000; Gold; )>\

[@upspell()]
#ACT
MOV A1 %ARG(1)
MOV D1 %ARG(2)
MOV D2 %ARG(3)
MOV D3 %ARG(4) ;FP?
MOV D4 %ARG(5) ;Gold?
#SAY
Upgrade spell to which level?\
<Level 4/@skillupg(6)>\
<Level 5/@skillupg(7)>\\

[@skillupg()]
#ACT
Mov D5 %arg(1)
#If
EQUAL d5 5
#act
goto @skillup2
#if
equal d5 6
#act
goto @skillup2a


[@skillup2]
#IF
CHKMAGICLEVEL %A1 4
!CHKMAGICLEVEL %A1 5
CHECKLEVEL %D1
#act
goto @skillup3
#ELSESAY
I can't do that, check you have what is required

[@skillup2a]
#IF
CHKMAGICLEVEL %A1 5
!CHKMAGICLEVEL %A1 6
CHECKLEVEL %D2
#ACT
goto @skillup3
#ELSESAY
I can't do that, check you have what is required


[@skillup3]
#IF
CheckFame
checkgold %D4
#ELSESAY
I can't do that, check you have what is required.
#ACT
#ACT
Mov D3 %P9 ;again this should be fp right?
INC D3 1;again this should be fp right?
SetFame %D3;again this should be fp right?
HLSCRIPTCMD CHANGEMAGLEVEL %A1 %D5
Take gold %D4
#SAY
Congratulations <$output(A1)> increased to level <$output(D5)>\
<EXIT/@exit>\\
 
Last edited:
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
ok found a problem with this, still wont work. Can someone please help me out with this please asap as making server live soon. Thanks
 

Attachments

  • Skill upgrade.txt
    1.6 KB · Views: 11
Upvote 0

chimera

LOMCN VIP
VIP
Jul 30, 2003
1,054
23
235
UK
May not work, I think the checkfame would have to be in it's own subscript otherwise it may get confused what p9 is.
 
Upvote 0