KeyMaker System - Text Based

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Ayup all, thought I would post this here instead of in the reply to the problem post.

To create a key based KR system or entry system, you are only required to create 2 files and edit a 3rd file. Real Easy :)

Create 2 file's (Mine were create in the "QuestDiary\EventSystem" Folder but you can put them anywhere inside the QuestDiary folder, just change the path in the following files) called..

KeyMakerCall.txt and KeyMaker.txt

The KeyMaker.txt is an empty file and will be used to store how many of each type of key everyone has.

The KeyMakerCall.txt file should contain the following script.

Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;; Set KR for Check Key ;;;;;;;;;;;;;;;;;
[@CheckKeyDCKR]
#ACT
   Mov A1 "DCKR"
   Goto @CheckKey


[@CheckKeyWTKR]
#ACT
   Mov A1 "WTKR"
   Goto @CheckKey


;;;;;;;;;;;;;;;; Check Key ;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[@CheckKey]
#ACT
   Mov A0 %USERNAME
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] %A1
#IF
   ELarge D1 1
#ACT
   Dec D1 1
   SaveValue "QuestDiary\EventSystem\KeyMaker.txt" [%A0] %A1 %D1
   SysMsg "Your In! You now have <$OUTPUT(D1)> <$OUTPUT(A1)> Keys Left"
   Enter_Ok
#ELSEACT
   SysMsg "You do not have a key to this room!"


;;;;;;;;;;;;;;;; Set KR for Add Key ;;;;;;;;;;;;;;;;;;;

[@AddKeyDCKR]
#ACT
   Mov A1 "DCKR"
   Goto @AddKey

[@AddKeyWTKR]
#ACT
   Mov A1 "WTKR"
   Goto @AddKey

;;;;;;;;;;;;;;;; Add Key ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[@AddKey]
#ACT
   Mov A0 %USERNAME
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] %A1
   Inc D1 1
   SaveValue "QuestDiary\EventSystem\KeyMaker.txt" [%A0] %A1 %D1
   SysMsg "<$OUTPUT(A1)> Key Added, you now have <$OUTPUT(D1)> <$OUTPUT(A1)> Keys"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

As you can see, it's very easy to add another mob and map to this script, just add another section under "Set KR for Check Key" and another section under "Set KR for Add Key"

Finally edit the mapquest with whatever you have set above (mine is only done using my test rooms and some farm animals, but change it to what you want. You are always calling the same script, just a different part in it.

Code:
Z011 [0] 0 [Enter] * * [EventSystem\KeyMakerCall] [@CheckKeyDCKR]
Z012 [0] 0 [Enter] * * [EventSystem\KeyMakerCall] [@CheckKeyWTKR]
Z010 [0] 0 [MonDie] Bull * [EventSystem\KeyMakerCall] [@AddKeyDCKR]
Z010 [0] 0 [MonDie] Chicken * [EventSystem\KeyMakerCall] [@AddKeyWTKR]

Hope this helps... Any Questions?

Screenshots below :)

Kill the Mob
SCREEN0002.JPG

Enter the KR
SCREEN0004.JPG
 
Last edited:

Finality

Dedicated Member
Dedicated Member
Jan 7, 2013
39
2
34
Is easy for .txt , but people do not know how to use it, thank you very much for the good work release.
You should then inform the table to indicate how you have to terminate the release
 

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
need to make a new @addkey for each km?

---------- Post Merged at 08:00 PM ---------- Previous Post was at 07:33 PM ----------

and can players check on current npc how many keys they have for each km?
 

Voya

Golden Oldie
Golden Oldie
Mar 15, 2008
967
53
135
USA
Awesome post! +rep

turns out i have given out "to much rep"
I'll rep you wenever i can :)
 
  • Like
Reactions: dagras

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
awesome job thank you so much i can gladly say this works !!!! :D rep+
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Is easy for .txt , but people do not know how to use it, thank you very much for the good work release.
You should then inform the table to indicate how you have to terminate the release

I just explained how to use it?

Soz, but didn't understand the 2nd bit?

need to make a new @addkey for each km?

---------- Post Merged at 08:00 PM ---------- Previous Post was at 07:33 PM ----------

and can players check on current npc how many keys they have for each km?

Yes to each @AddKey bit, but only the top bit

I'll write the NPC now.. sec :)

---------- Post Merged at 11:05 PM ---------- Previous Post was at 11:02 PM ----------

Code:
[@Main]
#IF
#ACT
   Mov A0 %USERNAME
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DCKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] WTKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] ABKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] CDKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DEKR
#SAY
Your have the following Keys\
DCKR - <$OUTPUT(D1)> Keys\
WTKR - <$OUTPUT(D2)> Keys\
ABKR - <$OUTPUT(D3)> Keys\
CDKR - <$OUTPUT(D4)> Keys\
DEKR - <$OUTPUT(D5)> Keys\
#IF
#ACT
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] FGKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] HIKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] JKKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] LMKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] OPKR
#SAY
FGKR - <$OUTPUT(D1)> Keys\
HIKR - <$OUTPUT(D2)> Keys\
JKKR - <$OUTPUT(D3)> Keys\
LMKR - <$OUTPUT(D4)> Keys\
NOKR - <$OUTPUT(D5)> Keys\\
<[ Exit ]@exit>\\
 

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Code:
[@Main]
#IF
#ACT
   Mov A0 %USERNAME
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DCKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] WTKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] ABKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] CDKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DEKR
#SAY
Your have the following Keys\
DCKR - <$OUTPUT(D1)> Keys\
WTKR - <$OUTPUT(D2)> Keys\
ABKR - <$OUTPUT(D3)> Keys\
CDKR - <$OUTPUT(D4)> Keys\
DEKR - <$OUTPUT(D5)> Keys\
#IF
#ACT
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] FGKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] HIKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] JKKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] LMKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] OPKR
#SAY
FGKR - <$OUTPUT(D1)> Keys\
HIKR - <$OUTPUT(D2)> Keys\
JKKR - <$OUTPUT(D3)> Keys\
LMKR - <$OUTPUT(D4)> Keys\
NOKR - <$OUTPUT(D5)> Keys\\
<[ Exit ]@exit>\\

I think that this way you only can have 10 types of keys (D0,D1,D2,D3,D4,D5,D6,D7,D8,D9). Maybe im wrong but u can use this code:

Code:
[@Main]
#IF
#ACT
   Mov A0 %USERNAME
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DCKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] WTKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] ABKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] CDKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DEKR
#SAY
Your have the following Keys\
DCKR - <$OUTPUT(D1)> Keys\
WTKR - <$OUTPUT(D2)> Keys\
ABKR - <$OUTPUT(D3)> Keys\
CDKR - <$OUTPUT(D4)> Keys\
DEKR - <$OUTPUT(D5)> Keys\
<Next page/@2>

[@2]
#IF
#ACT
   LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] FGKR
   LoadValue D2 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] HIKR
   LoadValue D3 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] JKKR
   LoadValue D4 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] LMKR
   LoadValue D5 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] OPKR
#SAY
FGKR - <$OUTPUT(D1)> Keys\
HIKR - <$OUTPUT(D2)> Keys\
JKKR - <$OUTPUT(D3)> Keys\
LMKR - <$OUTPUT(D4)> Keys\
NOKR - <$OUTPUT(D5)> Keys\\
<[Return]@main>____<Next page/@3>\\

[@3]
....
 

Finality

Dedicated Member
Dedicated Member
Jan 7, 2013
39
2
34
I thought I'd tell you, but as he had no desire to test it because I preferred to keep quiet


There is another way to mount:


#IF
#SAY
Your have the following Keys\
DCKR - <$@DCKR> Keys\
WTKR - <$@WTKR> Keys\
ABKR - <$@ABKR> Keys\
CDKR - <$@CDKR> Keys\
DEKR - <$@DEKR> Keys\



[@DCKR]
#IF
#ACT
MOV A0 %USERNAME
LoadValue D1 "QuestDiary\EventSystem\KeyMaker.txt" [%A0] DCKR
#IF
#SAY
<$OUTPUT(D1)>

This shows the inside of the call, I hope you served.
 
Last edited:

Geordiehc

Mad Dog Geo
VIP
Jul 4, 2007
2,827
49
195
Redditch, UK
I thought I'd tell you, but as he had no desire to test it because I preferred to keep quiet


There is another way to mount:




This shows the inside of the call, I hope you served.

Can anyone confirm this? and if so does this mean it does not have to be moved to a variable? would solve a lot of problems as 9 max variables is a pain in the ass
 

Finality

Dedicated Member
Dedicated Member
Jan 7, 2013
39
2
34
I think it will work, trust my podreis and thus use more variables followed. The problem is that this method can not only use it with SQL THROUGH texts.
 

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
i have 16 keys = 16 variables and the script from ida works just as well
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
I think that this way you only can have 10 types of keys (D0,D1,D2,D3,D4,D5,D6,D7,D8,D9). Maybe im wrong but u can use this code:

I won't bother quoting the code, but you clearly didn't look at my code before saying you can only have 10, I only used 5 variables there not 10. You can have as many keys as you want, just copy and past and change the names.

Can anyone confirm this? and if so does this mean it does not have to be moved to a variable? would solve a lot of problems as 9 max variables is a pain in the ass

I'll confirm it when I get in tonight.. never seen it done like that before and I can't see it working.. but would be cool if it did lol.
 

Finality

Dedicated Member
Dedicated Member
Jan 7, 2013
39
2
34
I won't bother quoting the code, but you clearly didn't look at my code before saying you can only have 10, I only used 5 variables there not 10. You can have as many keys as you want, just copy and past and change the names.

Ida, i make a text with d1,d2,d3,d4,d5,d6, and d7 are in script but in text not look.