Stupid script i can't see what's wrong.

TheMightyOne

Golden Oldie
Golden Oldie
Jun 14, 2004
722
3
104
UnitedKingdom
Sorry to post but it's annoying me now. Can't seem to sort it.

I've got this script as a Starter Npc and when I click which class i am. I get the kit which is fine, But if I don't close the window, I can click it again and it will give me another kit.
If I close the window, it all works fine but I want it to work properly.

Here is what i'm having trouble with.

<Can I Have a Starter Kit?/@startkit>\
<Send me to the leveling caves/@levelingcaves>\

[@levelingcaves]
#ACT
mapmove Start 18 29
break



[@startkit]
#IF
check [107] 1
#SAY
Each new player gets one start kit and\
i'm afraid you've already had yours.\
<Close Window/@exit>\ \
#ELSESAY
SERVERNAME - Start Kit\
What? Of course you can, First choose your class though.\
<Choose Class/@Items1> alot. - <Close Window/@exit>


[@Items1]
#IF
#SAY
Please select your class.\
<Warrior/@Warrior>\
<Taoist/@Taoist>\
<Wizard/@Wizard>\
<Close Window/@exit>\\

[@Warrior]
#IF
checkjob warrior
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 9
GIVE (MP)MDrugBundl 2
SET [107] 1
break
#ELSESAY
You are not a warrior
<Close Window/@exit>

[@Taoist]
#IF
checkjob taoist
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon2
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE Amulet 2
GIVE GreenPoison
GIVE RedPoison
GIVE (HP)MDrugBundl 4
GIVE (MP)MDrugBundl 7
SET [107] 1
break
#ELSESAY
You are not a taoist\
<Close Window/@exit>

[@Wizard]
#IF
checkjob wizard
#ACT
GIVE StarterRing1 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon1
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 6
GIVE (MP)MDrugBundl 5
SET [107] 1
break
#ELSESAY
You are not a wizard\
<Close Window/@exit>


It's simple i'm sure, but I can't see it :P
 

craigj

LOMCN Veteran
Veteran
Jul 18, 2006
392
3
44
South Wales !!
Ok the bits i think that you need are in bold.

[@main]
<Can I Have a Starter Kit?/@startkit>\
<Send me to the leveling caves/@levelingcaves>\

[@levelingcaves]
#ACT
mapmove Start 18 29
break



[@startkit]
#IF
check [107] 1
#SAY
Each new player gets one start kit and\
i'm afraid you've already had yours.\
<Close Window/@exit>\ \
#ELSESAY
SERVERNAME - Start Kit\
What? Of course you can, First choose your class though.\
<Choose Class/@Items1> alot. - <Close Window/@exit>

On this startkit bit of the script, i think, not 100%, that you need to check the flag then #say - what your saying in #elsesay - and the bit that is in #elsesay needs to be in - #say. So the otherway round.


[@Items1]
#IF
#SAY
Please select your class.\
<Warrior/@Warrior>\
<Taoist/@Taoist>\
<Wizard/@Wizard>\
<Close Window/@exit>\\

[@Warrior]
#IF
checkjob warrior
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 9
GIVE (MP)MDrugBundl 2
SET [107] 1
break
#ELSESAY
You are not a warrior
<Close Window/@exit> - break

[@Taoist]
#IF
checkjob taoist
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon2
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE Amulet 2
GIVE GreenPoison
GIVE RedPoison
GIVE (HP)MDrugBundl 4
GIVE (MP)MDrugBundl 7
SET [107] 1
break
#ELSESAY
You are not a taoist\
<Close Window/@exit> - break

[@Wizard]
#IF
checkjob wizard
#ACT
GIVE StarterRing1 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon1
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 6
GIVE (MP)MDrugBundl 5
SET [107] 1
break
#ELSESAY
You are not a wizard\
<Close Window/@exit> - break


ALSO - You have used the npc flag [107] a bit too much mate. im sure you can set any npc flag between the numerals of 101-501 or something along those lines and you cannot use the same number more than once.


Hope i helped.

/Mrbeefy
 
Upvote 0

Killmaster

Legend
Legendary
Golden Oldie
Loyal Member
Nov 13, 2003
3,967
27
274
MrBeefy... that is totally wrong.
Try using 'close' instead of break.
 
Upvote 0

iJam

To the rhythm
VIP
Oct 8, 2007
1,526
105
240
London
[@main]
#Say
Hello <$SERVERNAME>\ \
<Can I Have a Starter Kit?/@startkit>\
<Send me to the leveling caves/@levelingcaves>\

[@levelingcaves]
#ACT
mapmove Start 18 29
#SAY
Be Cearfull noobiee\
<i am no noob!!/@exit>\


[@startkit]
#IF
check [107] 0
#ACT
goto @Class
#ELSEACT
goto @sorry

[@sorry]
#SAY
Each new player gets one start kit and\
i'm afraid you've already had yours.\

[@class]
#SAY
What? Of course you can, First choose your class though.\ \
<Warrior/@Warrior>\
<Taoist/@Taoist>\
<Wizard/@Wizard>\
<Close Window/@exit>\\

[@Warrior]
#IF
checkjob warrior
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 9
GIVE (MP)MDrugBundl 2
SET [107] 1
close
#ELSESAY
You are not a warrior
<Close Window/@exit>

[@Taoist]
#IF
checkjob taoist
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon2
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE Amulet 2
GIVE GreenPoison
GIVE RedPoison
GIVE (HP)MDrugBundl 4
GIVE (MP)MDrugBundl 7
SET [107] 1
close
#ELSESAY
You are not a taoist\
<Close Window/@exit>

[@Wizard]
#IF
checkjob wizard
#ACT
GIVE StarterRing1 2
GIVE StarterBrace 2
GIVE StarterNecklace
GIVE StarterHelmet
GIVE StarterWeapon1
GIVE StarterArm(M)
GIVE StarterArm(F)
GIVE (HP)MDrugBundl 6
GIVE (MP)MDrugBundl 5
SET [107] 1
close
#ELSESAY
You are not a wizard\
<Close Window/@exit>


Shud work
 
Last edited:
Upvote 0

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
175
Code:
[@main]
<Can I Have a Starter Kit?/@startkit>\
<Send me to the leveling caves/@levelingcaves>\

[@levelingcaves]
#ACT
mapmove Start 18 29
break



[@startkit]
#IF
check [107] 1
#SAY
Each new player gets one start kit and\
i'm afraid you've already had yours.\
<Close Window/@exit>\ \
#ELSESAY
<$SERVERNAME> - Start Kit\
What? Of course you can, First choose your class though.\
<Choose Class/@Items1> alot. - <Close Window/@exit>


[@Items1]
#IF
#SAY
Please select your class.\
<Warrior/@Warrior>\
<Taoist/@Taoist>\
<Wizard/@Wizard>\
<Close Window/@exit>\\

[@Warrior]
#IF
checkjob warrior
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace 1
GIVE StarterHelmet 1
GIVE StarterWeapon 1
GIVE StarterArm(M) 1
GIVE StarterArm(F) 1
GIVE (HP)MDrugBundl 9
GIVE (MP)MDrugBundl 2
SET [107] 1
close
#ELSESAY
You are not a warrior
<Close Window/@exit>

[@Taoist]
#IF
checkjob taoist
#ACT
GIVE StarterRing 2
GIVE StarterBrace 2
GIVE StarterNecklace 1
GIVE StarterHelmet 1
GIVE StarterWeapon2
GIVE StarterArm(M) 1
GIVE StarterArm(F) 1
GIVE Amulet 2
GIVE GreenPoison 1
GIVE RedPoison 1
GIVE (HP)MDrugBundl 4
GIVE (MP)MDrugBundl 7
SET [107] 1
close
#ELSESAY
You are not a taoist\
<Close Window/@exit>

[@Wizard]
#IF
checkjob wizard
#ACT
GIVE StarterRing1 2
GIVE StarterBrace 2
GIVE StarterNecklace 1
GIVE StarterHelmet 1
GIVE StarterWeapon1
GIVE StarterArm(M) 1
GIVE StarterArm(F) 1
GIVE (HP)MDrugBundl 6
GIVE (MP)MDrugBundl 5
SET [107] 1
close
#ELSESAY
You are not a wizard\
<Close Window/@exit>

that should be completely fixed now... there were some bits that were missed above...
 
Last edited:
Upvote 0