- 0
Make WOE participation time still count when change character and reward 1 IP only get one ..
Asked by
Styx15
-
Recently Browsing 0 members
- No registered users viewing this page.
Asked by
Styx15
By using this site, you agree to our Terms of Use and Privacy Policy.
Hello i have script from Secrets..
i need to help set time participation sill count when user change character..because when user change character time reset from 0 again...
And setting 1 Ip only can get reward one time only..dual not count...
thank you before..
//===== rAthena Script ======================================= //= Time-based WoE participation reward. //===== By: ================================================== //= Secret //===== Description: ========================================= //= A WoE participation timer counter. //===== Additional Comments: ================================= //= Don't make WoE sessions overlap or the script will go nuts! //============================================================ amatsu,102,164,6 script WoE Reward 4_GEFFEN_08,{ mes .n$; mes "You can claim the WoE participation prizes if you participated in the last WoE longer than " + .min_time + " minutes."; if(.cash) mes "- " + .cash$[1] + ": " + .cash; if(.zeny) mes "- Zeny:" + callfunc("F_InsertComma",.zeny); [email protected] = getarraysize(.items); if([email protected]) { mes "- Items:"; for([email protected] = 0; [email protected] < [email protected]; [email protected] += 2) { mes " x" + .items[[email protected]+1] + " " + getitemname(.items[[email protected]]); } } next; mes .n$; if (agitcheck() || agitcheck2() || agitcheck3()) { mes "You can only claim the prizes when the WoE is not active."; mes "Your WoE participation time is "+ WOE_Timer +" minute" + (WOE_Timer > 1 ? "s" : "") + "."; close; } if(WOE_Timer_Claimed) { mes "You already claimed your WoE participation prize."; close; } if(WOE_Timer < .min_time) { mes "Your WoE participation time is not enough."; mes "Your WoE participation time is "+ WOE_Timer +" minute" + (WOE_Timer > 1 ? "s" : "") + "."; mes "While you have to participate for " + .min_time +" minute" + (.min_time > 1 ? "s" : "") + "."; close; } mes "Do you want to claim your prize?"; mes "You have participated in the last WoE for " + WOE_Timer + " minutes."; mes "Remember, if you don't claim your prize now, It will be lost once the next WoE starts!"; next; switch(select("Claim the prize", "Later")) { case 1: mes .n$; mes "Thank you for participating in the War of Emperium!"; WOE_Timer_Claimed = true; if(.cash) { set getd(.cash$[0]), getd(.cash$[0]) + .cash; dispbottom "Received " + .cash + " " + .cash$[1] + ". Total: " + getd(.cash$[0]); } if(.zeny) { Zeny += .zeny; dispbottom "Received " + .zeny + " zeny."; } for([email protected] = 0; [email protected] < [email protected]; [email protected] += 2) { getitem .items[[email protected]],.items[[email protected]+1]; } break; case 2: break; } close; OnCheck: if(!getcharid(2) || (!agitcheck() && !agitcheck2() && !agitcheck3())) { WOE_Start = 0; } else { if(WOE_Start != [email protected]_time) { callsub(S_OnReset); } WOE_Start = [email protected]_time; getmapxy([email protected]$,[email protected],[email protected],UNITTYPE_PC); if(mf_gvg_te_castle != 0) { if(!getmapflag([email protected]$,mf_gvg_castle) && !getmapflag([email protected]$,mf_gvg_te_castle)) return; } else { if(!getmapflag([email protected]$,mf_gvg_castle)) { return; } } if(@woe_last_map$ == [email protected]$ && @woe_last_x == [email protected] && @woe_last_y == [email protected]) { @woe_idle++; } else { @woe_idle = 0; } @woe_last_map$ = [email protected]$; @woe_last_x = [email protected]; @woe_last_y = [email protected]; if(@woe_idle < .idle_tolerance) { [email protected] = getarraysize(.map$); for([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if(.map$[[email protected]] == strcharinfo(3)) { WOE_Timer++; dispbottom "[WOE Timer] WoE participation: " + WOE_Timer + " minutes."; break; } } } } return; OnInitCheck: callsub(OnCheck); addtimer 60000,strnpcinfo(0) + "::OnInitCheck"; end; OnPCLoginEvent: callsub(OnInitCheck); end; S_OnReset: WOE_Timer = 0; WOE_Start = 0; WOE_Timer_Claimed = false; return; OnAgitStart: OnAgitStart2: OnAgitStart3: [email protected]_time = atoi("" + gettime(DT_YEAR) + gettime(DT_MONTH) + gettime(DT_DAYOFMONTH) + gettime(DT_HOUR)); end; OnInit: .n$ = "[WoE Reward]"; // NPC name .min_time = 10; // Minimum time in minutes to claim the reward. setarray .cash$[0],"#KAFRAPOINTS","Cash Points"; // Point variable and human-friendly text .cash = 10000; // Points that will be given .zeny = 25000000; // Zeny that will be given // Items that will be given setarray .items,13630,1,12679,10,12680,10,7179,20; .idle_tolerance = 5; // Minutes of idling before the timer becomes be paused. setarray .map$,"payg_cas02","arug_cas02"; // WoE Castles }
Edited by Styx15Link to comment
Share on other sites