Makin an NPC only usable a limited number of times

Desolation Mir2 (Med Rate Server)

Bon

Legend
Legendary
Jul 29, 2004
6,745
346
330
Kent, UK
Is it possible to write a NPC script that will only speak to some1 say once, twice, 10x a day etc...

for example, an npc that gives a player a EXP once per day

is this possible? if so how?

something like

[@main]
#IF
--- has had prize ---
#SAY
sorry you alrdy had ur prize for 2day
#ELSEACT
goto @main00


[@main00]
Hi i see u havnt claimed your daily prize,\
would you like it?\ \

<yes plz/@Yes>\
<no ta/@exit>\

[@yes]
#ACT
give prize 1
---- set osemthing??? ----
#SAY
enjoy your prize, come see me 2moro for more


hope that makes sense lol. something like that but also for 3/ 9 / 15 etc w/e prizes per day


[edit] just started readin thro variables as i got a feelin u can prob do it with taht? dont rly know much about it all atm lol so we'll see once ive read the guide ;X
 
Last edited:

Killmaster

Legend
Legendary
Golden Oldie
Loyal Member
Nov 13, 2003
3,967
27
274
Perhaps use the checkday command.
A little bit of thought then I think you would be able to do it. Might be a little complexe but hey.
 
Upvote 0

Liandrin2

Golden Oldie
Golden Oldie
Loyal Member
Jan 14, 2004
890
6
105
Yeh should be doable if a little long, something like:

checkday Mon
give exp
delnamelist Tues
delnamelist Wed
delnamelist Thur
etc
addnamelist Mon

Then if day is monday and names in namelist then don't give exp out. Next day:

checkday tues
give exp
delnamelist Mon
delnamelist Wed
delnamelist Thur
etc
addnamelist Tues

Obviously thats not a script but you should get the idea even though I've explained it badly. I had a version a while ago and it worked fine.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,745
346
330
Kent, UK
figurin it out to use variables + checkin day was well confusing lol, but done it and works fine

thx for the idea liandrin ^^
 
Upvote 0