View Single Post
  #1  
Old 06-13-2002, 01:15 AM
darkriders_p2p darkriders_p2p is offline
Registered User
Join Date: Jan 2002
Location: Canada
Posts: 690
darkriders_p2p is on a distinguished road
question concerning a script

K would this work online?
I'm making it for a blacksmith, when you say you want a shovel crafted it would set server.busy to shovel.I programmed this to wait 300 seconds (or 5 minutes) then he would go to the market (when he hides) and when he comes back it deletes the string.
I can't test it offline because timevar for some reason is always equal to 80 000 or something.
NPC Code:

if (!strequals(#s(server.busy),)) {
setstring server.crafttime,timevar+(strtofloat(300));
setcharprop #c,I'm making a #s(server.busy);
}
if (timevar>=strtofloat(#s(server.crafttime))) {
setstring server.busy,market;
}
while (strequals(#s(server.busy),market)) {
hide;
sleep 200;
show;
deletestring server.crafttime,;
deletestring server.busy,;
}

__________________
maximus_asinus
Reply With Quote