[Holley] Integral Random Points Problem

Vaeborg

LOMCN Veteran
Veteran
Aug 4, 2012
257
29
55
Hello All :)

I started this topic I started this topic because I have a problem with the script in npc :P do not want randomly give points

Here i give Script


[@Add1]
{
#SAY
Would You like to add Integrals to your Integral Bank account?\\
Integral(S) 0-2 Point (Random) <Add/@small>\\
Integral(M) 5-20 Points (Random) - <Add/@medium>\\
Integral(L) 10-40 Points (Random) - <Add/@large>\\
#ACT
BREAK


;--------------------------- Medium ---------------


[@small]
#IF
RANDOM 4
CHECKITEM Integral(S) 1
#ACT
TAKE Integral(S) 1
LoadValue D3 "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME
INC D3 1
SaveValue "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME %D3
#SAY
You Gained 1 Points.


#IF
RANDOM 3
CHECKITEM Integral(S) 1
#ACT
TAKE Integral(S) 1
LoadValue D3 "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME
INC D3 2
SaveValue "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME %D3
#SAY
You Gained 2 Points.






#IF
RANDOM 2
CHECKITEM Integral(S) 1
#ACT
TAKE Integral(S) 1
LoadValue D3 "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME
INC D3 0
SaveValue "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME %D3
#SAY
You Gained 0 Points.
}
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Not sure if I remember this right or not, but I would do something like this.

#IF
CHECKITEM Integral(S) 1
#ELSESAY
You do not have any Integral(S)!!\
#ELSEACT
Break

#IF
#ACT
MovR D0 3

#IF
Large D0 0
#ACT
LoadValue D3 "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME
INC D3 %D0
SaveValue "QuestDiary\IntegralSystem\IntegralSystem.txt" [Points] %USERNAME %D3
Break
#SAY
You Gained <$OUTPUT(D0)> Points, you now have <$OUTPUT(D3)> Points\
#ELSESAY
Sorry, you didn't get any points this time!
#ELSEACT
Break
 
  • Like
Reactions: pijakus
Upvote 0