[CD3.55] Integral Issues - Getting data from SQL

RealLionSoul

Dedicated Member
Dedicated Member
Oct 13, 2013
79
1
34
Hi guys,

I hope someone can shed some light on this for me.

So making a script which will check is a boss is dead or alive. I noticed on the script i was using (CD3.55working files) that it was looking up data from tbl_integral. Although the actual famepoint system is looking up from the HL_JiFen table so i thought it would be a good idea to change it to look up the HL_JiFen table.

Making the changes (below) it still shows that i have 0 integral. Could someone help with the below script?

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;[@CheckBoss]
{
#IF
#SAY
Hi <$Username>, you currently have <$HLPOINT> Integral Points\
You can now check to see if the Boss\
you want is Alive.. saves running.. :)\
The Cost is 500 Integral\\
Select a Boss\\
<[ AncientEmperor ]/@CheckBoss1(AncientEmperor,ATKR2,5)>\
<[ AncientSoul ]/@CheckBoss1(AncientSoul,ATKR1,5)>\
<[ ApeKing ]/@CheckBoss1(ApeKing,D904,5)>\
<[ BlackKing ]/@CheckBoss1(BlackKing,D1305,5)>\
<[ BoarKing ]/@CheckBoss1(BoarKing,D705,5)>\
<[ BoneLord ]/@CheckBoss1(BoneLord,D605,5)>\
<[ DeadSoul ]/@CheckBoss1(DeadSoul,D2107,5)>\
<[ DemonicNecro ]/@CheckBoss1(DemonicNecro,D004,5)>\
<[ DemonicUnderlord ]/@CheckBoss1(DemonicUnderlord,D2004,5)>\
<[ DemonicUnderlord ]/@CheckBoss1(DemonicUnderlord,D2005,5)>\
<[ EvilCentipede ]/@CheckBoss1(EvilCentipede,D805,5)>\
<[ EvilEmperor ]/@CheckBoss1(EvilEmperor,D1406,5)>\
<[ ForbiddenKing ]/@CheckBoss1(ForbiddenKing,FBIKR,5)>\
<[ Ghoul ]/@CheckBoss1(Ghoul,D203,5)>\
<[ GreatDarkArachnid ]/@CheckBoss1(GreatDarkArachnid,D001,5)>\
<[ GreatNumaMonk ]/@CheckBoss(GreatNumaMonk,D002,5)>\
<[ MinotaurKing ]/@CheckBoss1(MinotaurKing,D1012,5)>\
<[ OmaKing ]/@CheckBoss1(OmaKing,10,5)>\
<[ RedMoonEvil ]/@CheckBoss1(RedMoonEvil,D905,5)>\
<[ ToxinOma ]/@CheckBoss1(ToxinOma,D2205,5)>\
<[ WoomaTaurus ]/@CheckBoss1(WoomaTaurus,D504,5)>\
<[ Tadanga ]/@CheckBoss1(Tadanga,D1506,5)>\
<[ ZumaTaurus ]/@CheckBoss1(ZumaTaurus,D1106,5)>\
<[ Demon ]/@CheckBoss1(Demon1,D2900,5)>\\
<[ Integral Main Menu ]/@IntegralMainMenu>\\\


[@CheckBoss1()]
#ACT
   MOV  A0   %ARG(1)
   MOV  A1   %ARG(2)
   MOV  D3   %ARG(3)
#SAY
Are you sure?\
<[ Check It ]/@CheckBoss12>\
<[ Back ]/@IntegralMainMenu>\


[@CheckBoss12]
#ACT
   FormatStr "User_ID='%s'" %USERID
   ReadValueSql  "HL_JiFen"  %A9  "User_ID,User_JiFen"  [@CheckBoss22]
[@CheckBoss22()]
#IF
#ACT
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
#ACT
   FormatStr "User_ID='%s'" %USERID
   mov   A8     %A9
   dec   D2     %D3
   mov   D4     %D2
   FormatStr "User_JiFen='%s'" %D4
   UPDATEVALUESQL "HL_JiFen" %A8 %A9
   mov     A7  ""
   AddStr  A7 %USERID
   AddStr  A7 ",CheckBoss,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#Elsesay
You do not have enough Integral Points\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>
#ELSEACT
Break


#IF
Checkmonmap %A1 1 %A0
#SAY
<$OUTPUT(A0)> {FCOLOR/10}Alive{FCOLOR/12}\
Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>
#ELSESAY
<$OUTPUT(A0)> {FCOLOR/1}Dead{FCOLOR/12}\
Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>


}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Thanks :)
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Ha Ha :) My Script.

If you are using the normal system for integral, use SETPOINT and CHECKPOINT (I think those are the commands), you don't need to actually read the table.

I didn't trust the normal one so wrote my own which is why it uses TBL_INTEGRAL.
 
  • Like
Reactions: RealLionSoul
Upvote 0

RealLionSoul

Dedicated Member
Dedicated Member
Oct 13, 2013
79
1
34
Ha Ha :) My Script.

If you are using the normal system for integral, use SETPOINT and CHECKPOINT (I think those are the commands), you don't need to actually read the table.

I didn't trust the normal one so wrote my own which is why it uses TBL_INTEGRAL.

Haha, it is. I think most of my scripts are yours :p

I get what you mean, i have started reworking with the setpoints and thats working now. Just your script was quicker to modify/add too.

Thanks again.
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
The only other thing to note, isn't the HL_Jifen table in CruelDragon3GBaseData database? You can only read/write to the Game3G database.
 
Upvote 0

RealLionSoul

Dedicated Member
Dedicated Member
Oct 13, 2013
79
1
34
Hiya,

Yeah we figured this out just after i posted. Was a little confused with the extra integral table. Makes sense now. The script it all working and logs in the same area as yours which is handy. Just need to figure out how to move it from NPC into the "D" window and it will be finished :)
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
To move anything to the D Menu, you have to access is via the MirGuideBook.txt which is in Envir\QuestDiary\System\

Just make sure any links @LINK are not used in more than one place in that menu and anywhere else it touches.
 
Upvote 0

RealLionSoul

Dedicated Member
Dedicated Member
Oct 13, 2013
79
1
34
To move anything to the D Menu, you have to access is via the MirGuideBook.txt which is in Envir\QuestDiary\System\

Just make sure any links @LINK are not used in more than one place in that menu and anywhere else it touches.

This is what i've done.

\Envir\QuestDiary\System\MirGuideBook.txt

Added 2 lines:

Code:
#IF
ISADMIN

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MirGuideBook.txt] @Convert_MirGuideBook_8

Then at the bottom, added:

Code:
[@CheckBoss]#CALL [IntegralSystem\CheckBoss.txt] @CheckBoss

Then added a line in:
\Envir\Convert_Def\QuestDiary\System\MirQuestBook.txt

Code:
[@Convert_MirGuideBook_8] 
{
___<Boss Finder/@CheckBoss> \ \


}

And it seems to be working :)

Also while we're talking about this. What are the variables after the Checks point too?
Code:
#IF
Check [101] 1

#IF
Check [203] 1

Thanks :)
 
Last edited:
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
I don't understand your question, I have never used [101] and [203] in the Sting files.

Sting's files has these flags used...

  • New User - 003
  • Halloween - 100
  • Taoist Pet Flags - 105
  • Taoist Pet Flags - 106
  • DGS Quest - 150
  • DGS Quest - 151
  • Daily Quest - 210
  • Warrior Once Per Level - 248
  • Warrior Once Per Level - 249
  • Doreen Quest - 251
  • Doreen Quest - 252
  • Adrian Quest - 253
  • Adrian Quest - 254
  • Paul Quest - 255
  • Paul Quest - 256
  • Mary Quest - 257
  • Mary Quest - 258
  • Anne Quest - 259
  • Anne Quest - 260
  • Harold Quest - 261
  • Harold Quest - 262
  • Harold Quest - 263
  • Ellison Quest - 264
  • Ellison Quest - 265
  • Ali Quest - 266
  • Ali Quest - 267
  • Master Quest Chosen - 271
  • Assassin Master - 272
  • Warden Master - 273
  • Alchemist Master - 274
  • Master Complete - 275
  • Booty Store Creation - 290
  • AT 1st Floor - 300
  • Mabanjin - 390
  • AT 2nd Floor - 398
  • AT 2nd Floor - 399
  • Level Up Hide - 400
  • UserLogin Hide - 401
  • Death Shout Hide - 402
  • Daily Quest - 409
  • Jinchon Quests - 450
  • Jinchon Quests - 451
  • Jinchon Quests - 452
  • Jinchon Quests - 453
  • Jinchon Quests - 454
  • Jinchon Quests - 455
  • Jinchon Quests - 456
  • Jinchon Quests - 457
  • Integral Info Add - 500
  • New User - 599 ?????

If you are asking what does the Check [***] 1 or Check [***] 0 mean that is easy enough to explain.

There is a built in variable system for each player. You can use the numbers 000 to 599 to store a 1 or a 0.

Suppose you wish to store where JoeBloggs has completed a quest, you would use

Code:
#IF
Check [001] 0    ;Checks if the FLAG 001 is a 0
#SAY
Do you want to complete the quest?
< Do the Quest >
#ELSESAY
You have already completed the quest.

You could then tell someone to go kill 10 hens, and when they have finished, you would..

Code:
#ACT
Set [001] 1    ;Sets the FLAG 001 to a 1

So the next time, it Check [001] 0, it will fail and run the already completed quest section.
 
Upvote 0