complex npc (people with skill required)

Join Discord

Far

tsniffer
Staff member
Developer
May 19, 2003
20,183
30
2,785
540
im trying to create a new function, but im highly stuck on how i could get this npc working. im only working from previous untranslated scripts so its quite hard. this is what i have so far

Code:
[@main]
#IF
#SAY
Please input your password
#ACT
mov D4 %INPUTSTR
goto @next

[@next]
#IF
#ACT
FormatStr "FLD_PASS='%s'" "PASSRANDOM"
UpdateValueSql "TBL_Password" %D4 "FLD_PASSID='001',FLD_PASSCONDITION='End'"


What i want to do is get person A to enter a password. the npc then needs to store that password in a table. Person B then opens the npc, is asked to enter the password. Another input string is needed to be used, and has to match with the current value in the table.

Im quite sure this is possible. but im stuck on how to do it.

Any help would be greatly apprieciated.
 

Tali

Dedicated Member
Dedicated Member
May 4, 2004
50
0
52
how many diffrent passwords will it need to store? just 1 or 1 for each char
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,183
30
2,785
540
in unrealistic terms (if every online user clicks this npc around the same time) then 1 for every character.

but when the player enters a password, i want the row to be cleared within 3 minutes.
 

Tali

Dedicated Member
Dedicated Member
May 4, 2004
50
0
52
in unrealistic terms (if every online user clicks this npc around the same time) then 1 for every character.
can b done if you use txt files (VE use's it for lots)

but when the player enters a password, i want the row to be cleared within 3 minutes.

been looking and mayb posable if u use txt files to save the passwords
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,183
30
2,785
540
i think i can manage to input and save a password into a txt file. im guessing it works almost the same as a namelist. the problem i have now is recalling that and making it match the string the second player inputs.

which is the reason id rather input it into a table, it would mean i could sort the passwords and give second values much more easy.
 

Tali

Dedicated Member
Dedicated Member
May 4, 2004
50
0
52
from what i can make out the second value wont need to be added to the table.

The best way i can think of doing it wud be like the way i did tele to player on VE

  • Player A clicks "Create new password"
  • Inputs password which is saved in a file with that players username.

  • Player B comes along and talks to the NPC and clicks "my friend has entered a pasword"
  • Player B then enters Player A's username.
  • Player B then has to enter the password that was saved along with Player A's Username.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,183
30
2,785
540
that sounds like it would do the trick. would you conside sharing that npc? if not over here then over msn?

my msn is [email protected]
 

Tali

Dedicated Member
Dedicated Member
May 4, 2004
50
0
52
edit: sorted....... :agree:
 
Last edited: