Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/18/19 in Posts

  1. 1 point
    AnnieRuru

    Daily random supplies

    erm ... its getting interestingly ... complexity ...
  2. 1 point
    AnnieRuru

    Daily random supplies

    https://github.com/AnnieRuru/Release/blob/master/Guides/Daily Quest - use gettimetick(2) or gettimestr.md function script timeleft__ { .@left = getarg(0); if ( .@left <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return sprintf( _$( "%d day %d hour" ), .@day, .@hour ); else if ( .@hour ) return sprintf( _$( "%d hour %d min" ), .@hour, .@min ); else if ( .@min ) return sprintf( _$( "%d min %d sec" ), .@min, .@sec ); else return sprintf( _$( "%d sec" ), .@sec ); } prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ .@today = atoi( gettimestr( "%Y%m%d", 9 ) ); if ( #daily_supply == .@today ) { mes "You have already taken today's supply"; mesf "You have to wait %s countdown to get next supply", timeleft__( getcalendartime(0,0) - gettimetick(2) ); close; } getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); #daily_supply = .@today; end; }
  3. 1 point
    AnnieRuru

    Outfits and Cashmount

    I knew that, but this doesn't show the weapon sprite although its a bit off when enable it hmm ... I just re-read the topic, you only want to enable attack/skill on these job sprite, not enabling the weapon sprite ... it was from lllaaazzz suggestion
  4. 1 point
    utofaery

    Daily random supplies

    prontera,158,167,3 script Sample 4_M_SIT_NOVICE,{ if (#xTaken + .next_take> gettimetick(2)) { mes "[Random Item Giver]"; mes "Please talk to me after 24 hours."; close; } else { mes "[Random Item Giver]"; mes "Have some of these!"; .@riRate1 = rand (.@Ai11,.@Ai12); .@riRate2 = rand (.@Ai21,.@Ai22); .@riRate3 = rand (.@Ai31,.@Ai32); .@rItemid1 = .@Aitem1[rand(getarraysize (.@Aitem1))]; .@rItemid2 = .@Aitem2[rand(getarraysize (.@Aitem2))]; .@rItemid3 = .@Aitem3[rand(getarraysize (.@Aitem3))]; getitem ( .@rItemid1, .@riRate1 ) ; // dispbottom ( "rItemid1 :: " + .@rItemid1 + " riRate1 :: " + .@riRate1 + " Name :: " + getitemname ( .@rItemid1 ) ) ; // debug use only !!! getitem ( .@rItemid2, .@riRate2 ) ; // dispbottom ( "rItemid2 :: " + .@rItemid2 + " riRate2 :: " + .@riRate2 + " Name :: " + getitemname ( .@rItemid2 ) ) ; // debug use only !!! getitem ( .@rItemid3, .@riRate3 ) ; // dispbottom ( "rItemid3 :: " + .@rItemid3 + " riRate3 :: " + .@riRate3 + " Name :: " + getitemname ( .@rItemid3 ) ) ; // debug use only !!! #xTaken = gettimetick(2); next; close; } OnInit: //set cooldown to take item again. .next_take = 24*60*60; //set item here setarray .Aitem1[0],501,502,503,504,505,14510; setarray .Aitem2[0],601,602,603,604,605,14510; setarray .Aitem3[0],701,702,703,704,705,14510; //set rate here .Ai11 = 1; .Ai12 = 10; .Ai21 = 5; .Ai22 = 15; .Ai31 = 10; .Ai32 = 20; end; } Refined and fixed up npc variable..
  5. 1 point
    AnnieRuru

    Daily random supplies

    curious, why all 3 sets have same item ID ? so it means they can be repeated ? prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); end; }
  6. 1 point
    Kuroe

    Daily random supplies

    Like this? prontera,158,167,3 script Sample 4_M_SIT_NOVICE,{ if (#gotreward + .next_take> gettimetick(2)) { mes "[Random Item Giver]"; mes "Please talk to me after 24 hours."; close; } else { set .random1,rand(getarraysize (.count1)); set .random2,rand(getarraysize (.count2)); set .random3,rand(getarraysize (.count3)); mes "[Random Item Giver]"; mes "Have some of these!"; getitem .item[rand(getarraysize (.item))],.count1[.random1]; getitem .item[rand(getarraysize (.item))],.count2[.random2]; getitem .item[rand(getarraysize (.item))],.count3[.random3]; #gotreward = gettimetick(2); next; close; } OnInit: .next_take = 24*60*60; setarray .item[0],656,657,505,645,506,14510; setarray .count1[0],1,10; setarray .count2[0],5,15; setarray .count3[0],10,20; end; } Edit: Thought it was 1-10 , 5-15 , and 10-20 instead of 1,10 5,15 and 10,20
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.