an apple a day...??!!?!

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
hey all, im lookin to make an npc that will give players an apple every 24 hours...so if u click it itll give u an apple or else say...you've already had todays apple, come back later!

i know this is possible...can someon please post the script i need, or an example...ty ty in advance
 

DeathWish

LOMCN VIP
VIP
Oct 29, 2003
1,269
2
265
lol hmm i know how to do it but it wud invlove the host clearing summin every 24 hours, maybe u cud make a program that does that instead, that wud be easy enough
 

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
no, there is an npc command that checks if its been 24 hours mate...i had it on an old server of mine, and i cant remember how, :(
 

DeathWish

LOMCN VIP
VIP
Oct 29, 2003
1,269
2
265
o if there is i dont know it >.< ur good at programming arnt u? u can just make it delete a .txt file every 24 hours and thats it then its easy :P
 

Lilcooldoode

LOMCN Developer
Developer
May 10, 2003
2,338
1
1,043
370
Yes
Only thing i can think of is the NPC giving apple to you only at a certain time of the day o.O
 

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
yeah but if i make a program, itll require to make a massive npc script, that will take ages...i think i mite go for the "time of day" one...chestnut, whats the script if i wanna make it between the hours of 5 + 7?
 

DeathWish

LOMCN VIP
VIP
Oct 29, 2003
1,269
2
265
[@main]
#IF
checknamelist apple.txt
#SAY
You have had your apple already today, come back tomorrow\ \

<Ok/@exit>\
#ELSEACT
Give Apple 1
Addnamelist apple.txt
#ELSESAY
There is your apple come back tomorrow for another apple \ \

<Thank you/@exit>\


lol wow thats massive :P
 

Knightmare

Dedicated Member
Dedicated Member
May 2, 2004
43
0
32
but that would mean u have to delete the file everyday because your name would still be in the apple.txt
 

DeathWish

LOMCN VIP
VIP
Oct 29, 2003
1,269
2
265
DeathWish said:
ur good at programming arnt u? u can just make it delete a .txt file every 24 hours and thats it then its easy :P

lol if u get a program to do it auto then it dont matter
 

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
right, we set it up so players can buyt houses with a garden, which has all stuff like trees (which well pretend are apple trees) and stuff, then u have an apple picker npc, and a meat npc who will give u meat everyday
 

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
yeah, but u dont gotta kil, the npc will kill em off so it looks good, then give u the meat
 

DeathWish

LOMCN VIP
VIP
Oct 29, 2003
1,269
2
265
lol ive done this with a guild farm but not with tree's just cows pigs and that :P
 

slippy

Dedicated Member
Dedicated Member
Apr 17, 2003
132
0
93
IRELAND
hee hee...ill make the proggy soon then....where do i release whn im done, mir2 releases or app development?