skill script messed up

smoochy boys on tour

MythRohan

LOMCN Veteran
Veteran
Nov 18, 2011
2,147
82
135
Northant's Town : Serious Gamer
This is a script ment to make only taos be able to click the npc and when the char is at the right Rebirth and they are a taoist then the npc will grant them the skill at the level requied below... the reason y im writing this is i was trying to make a kool script and i failed and i kent see what is wrong with this... i would have put it into a book but clueless and thought be beta addition to my server like this:

if any 1 could tell me where im going wrong id be very greatful :(

this is script below:



[@main]
#SAY
Hello i will only speak to a high leveled taoist..about this skill\
If you are a Tao and "Have" the right amount of wisdom (rebirth's)\
To support such a summon . you would rule the lands..\ \
\
Well lets see...
<yes please/@yes> <No thanks/@exit>


[@yes]
#IF
CHECKRENEWLEVEL < 7
checkjob Taoist
RANDOM 3 = 3
#ACT
TRAINSKILL SummonLordShinsu 3
#ELSEACT
goto @t1
break


[@t1]
#IF
CHECKRENEWLEVEL < 5
checkjob Taoist
RANDOM 3 = 2
#ACT
TRAINSKILL SummonLordShinsu 2
#ELSEACT
goto @t2
break


[@t2]
#IF
CHECKRENEWLEVEL < 3
checkjob Taoist
RANDOM 3 = 1
#ACT
TRAINSKILL SummonLordShinsu 1
#ELSEACT
goto @t3
break


[@t3]
#IF
CHECKRENEWLEVEL < 1
checkjob Taoist
RANDOM 3 = 0
#ACT
TRAINSKILL SummonLordShinsu 0
#ELSEACT
goto @t4
break


[@t4]
#SAY
You either do not meet the requirments needed\
or already have the skill in your book.\
Good Bye.\ \
<bye/@exit>


manythanks

Regards

M-R
 

Ilsta

Dedicated Member
Dedicated Member
Feb 20, 2012
563
23
80
Think this is over my head on understanding of the commands lol as wasn't aware you could #IF RANDOM 3 = 2, i take it the tao has already learnt the spell?
 
Upvote 0

MiloFoxburr

LOMCN VIP
VIP
Mar 23, 2003
7,276
199
370
Dublin, Ireland
Honestly your script confuses me. Why are you training the skill that way? Why have different renewlevel checks when the user can just keep clicking the npc to level the skill? It'll just take more clicks the lower your renewlevel is..

Anyway here's how I do training on skills. It's a bit neater than Samuels in my opinion.

Code:
[@trainFusion]
#ACT
MOVR P2 2
goto @trainSkillMain

[@trainSkillMain]
#IF
EQUAL P2 0
#ACT
TRAINSKILL Fusion 1
break

#IF
EQUAL P2 1
#ACT
TRAINSKILL Fusion 2
break

#IF
EQUAL P2 2
#ACT
TRAINSKILL Fusion 3
break

Basically MOVR P2 2 moves a random number between 0 and 2 into a temporary variable called P2 (P0-P9 can be used). EQUAL P2 0 checks that it matches and runs otherwise it moves to the next #if and checks. Since it'll always be 0,1 or 2 the script doesn't have to loop back ever.
 
Last edited:
Upvote 0

Paniko

LOMCN Veteran
Veteran
Loyal Member
Nov 15, 2006
267
5
65
perspicacious script =)

Honestly your script confuses me. Why are you training the skill that way? Why have different renewlevel checks when the user can just keep clicking the npc to level the skill? It'll just take more clicks the lower your renewlevel is..

Anyway here's how I do training on skills. It's a bit neater than Samuels in my opinion.

Code:
[@trainFusion]
#ACT
MOVR P2 2
goto @trainSkillMain

[@trainSkillMain]
#IF
EQUAL P2 0
#ACT
TRAINSKILL Fusion 1
break

#IF
EQUAL P2 1
#ACT
TRAINSKILL Fusion 2
break

#IF
EQUAL P2 2
#ACT
TRAINSKILL Fusion 3
break

Basically MOVR P2 2 moves a random number between 0 and 2 in a temporary variable called P2 (P0-P9 can be used). EQUAL P2 0 checks that it's and runs otherwise it moves to the next #if and checks. Since it'll always be 0,1 or 2 the script doesn't have to loop back ever.
 
Upvote 0