I'm trying to setup a quest wherein the player plants a seed and after 10 days, the seed will grow into an item.
my current script works something like this. The problem is that when I tried it on the script. Instead of adding the variable for the day of the year, it's just added next to it. (Current day of year: 200. If I put +10 to add on the variable instead of it being 210, it becomes 20010 instead.) How can I fix this?
yggdrasil01,194,95,0 script Cultivated Soil HIDDEN_NPC,{
if ( plant_for_me == 1 ) goto plant_count;
if ( countitem(512) > 0 ) goto plant_here;
plant_here:
delitem 512,1;
mes "Seed planted. Let's wait 10 days before harvesting.";
set plant_day1,gettime(DT_DAYOFYEAR);
set plant_for_me,1;
close;
plant_count:
if ( plant_day1 > plant_day+10 ) {
getitem 607,1;
end;
}
mes "This is still not ripe for the picking.";
next;
mes "Let's wait until it's ready for harvest.";
close;
}
Question
ran0120
I'm trying to setup a quest wherein the player plants a seed and after 10 days, the seed will grow into an item.
my current script works something like this. The problem is that when I tried it on the script. Instead of adding the variable for the day of the year, it's just added next to it. (Current day of year: 200. If I put +10 to add on the variable instead of it being 210, it becomes 20010 instead.) How can I fix this?
yggdrasil01,194,95,0 script Cultivated Soil HIDDEN_NPC,{ if ( plant_for_me == 1 ) goto plant_count; if ( countitem(512) > 0 ) goto plant_here; plant_here: delitem 512,1; mes "Seed planted. Let's wait 10 days before harvesting."; set plant_day1,gettime(DT_DAYOFYEAR); set plant_for_me,1; close; plant_count: if ( plant_day1 > plant_day+10 ) { getitem 607,1; end; } mes "This is still not ripe for the picking."; next; mes "Let's wait until it's ready for harvest."; close; }
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.