Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== rAthena Script ======================================================================
- //= Map Of The Week v4.4
- //===== Original By =========================================================================
- //= Kaushik
- //===== Current Version: ====================================================================
- //= 1.0 - Script Release.
- //= 1.1 - Added GM selection of Map Of The Week.
- //= 1.2 - Fixed Timer Selection of the Map is on Sunday @ 24:00 server time.
- //= 2.0 - Added Contract System.
- //= 2.1 - Fixed Contract Expiry (Set #MOTWC to 0 once contract is expired).
- //= 2.2 - Cleaned Script to remove some unneeded repertition and script. [ToastOfDoom]
- //= 2.3 - Added Bottle Grenade ingredients to the script as it was missed.
- //= 2.4 - Decreased the drop rate.
- //= 2.5 - Changed announce and dispbottom.
- //= 3.0 - Added Whisper Functions. (map, kills, contract, gm).
- //= 3.1 - Changed to dynamic Cost and Kills - @motwcost & @motwkill to your desired numbers.
- //= 3.2 - Added Menu To The NPC.
- //= 4.0 - Added GM commands to change random map, selected map & to Destroy all contracts.
- //= 4.1 - Removed SQL unwanted variable.
- //= 4.2 - Fixed script contract count variable.
- //= 4.3 - Fixed tweet to not give out contract if no map of the week is assigned.
- //= 4.4 - Fixed NPC Whisper
- //= 5.0 - Changed rewards to dynamic rewards [WIP].
- //===== Compatible With: ====================================================================
- //= Tested in SQL Revision 14435
- //===== Description: ========================================================================
- //= A Random Map Will be selected and edp, acid demo bottle ingredients are rewarded.
- //===========================================================================================
- prontera,164,169,4 script MOTW 903,{
- set @motwcost, 1000000; //The cost for the contract per @motwkill kills.
- set @motwkill, 10000; //Kills available while the contract is purchased for @motwcost Zeny.
- mes "[Map Of The Week]";
- mes "What do you want to do";
- switch(select("^00FF00-^000000Check Map Of The Week","^00FF00-^000000Check Rewards","^00FF00-^000000Contract Status","^00FF00-^000000Sign a Contract","^00FF00-^000000Commands","^FF0000-^000000Nothing"))
- {
- case 1:
- next;
- if($MOTW$ == ""){
- mes "The Map Of The Week has not been assigned.";
- close;
- }
- mes "[Map Of The Week]";
- mes "The Map Of The Week Is ^FF0000"+$MOTW$+"^000000. Every mob on that map has a chance to drop Bronze Coins which you can change for PODS.";
- close;
- case 2:
- next;
- mes "[Map Of The Week]";
- mes "The reward is ^FF0000Bronze Coin^000000 per mob kill.";
- close;
- case 3:
- next;
- mes "[Map Of The Week]";
- mes "Please wait while we check your deeds if any.";
- progressbar "green",5;
- if(!#MOTWC) {
- next;
- mes "[Map Of The Week]";
- mes "You dont have a contract";
- close;
- }
- mes "Your Contract Expires on ^FF0000"+(@motwkill-#MOTWKI)+"^000000";
- close;
- case 4:
- next;
- mes "[Map Of The Week]";
- if($MOTW$ == ""){
- mes "The Map Of The Week has not been assigned. You cannot purchase a contract at this time.";
- close;
- }
- mes "Do you want to buy a contract?";
- if(select("Yes:NO")-1) {
- mes "[Map Of The Week]";
- mes "So Long Looser";
- atcommand "@die";
- close;
- }
- else {
- mes "[Map Of The Week]";
- mes "It Would Cost ^FF0000"+@motwcost+" Zeny^000000 for ^FF0000"+@motwkill+" kills^000000";
- if(select("Sure I Will Pay:No")-1) {
- mes "[Map Of The Week]";
- mes "So Long Looser";
- atcommand "@die";
- close;
- }
- else {
- if (Zeny < @motwcost) goto MO_NoZeny;
- set Zeny,Zeny-@motwcost;
- set #MOTWC, 1;
- set #MOTWKI, 0;
- next;
- mes "[Map Of The Week]";
- mes "Your contract has been signed";
- mes "You can renew your contract anywhere by calling the npc";
- mes "whisper ^FF0000NPC:MOTW^000000";
- close;
- }
- }
- case 5:
- next;
- mes "[Map Of The Week]";
- mes "Wisper ^FF0000NPC:MOTW^000000";
- mes "Available Keywords :";
- mes "^00FF00-^000000^FF0000kills^000000 : the no. of kills left";
- mes "^00FF00-^000000^FF0000contract^000000 : to renew or buy contract";
- mes "^00FF00-^000000^FF0000map^000000 : to know the Map Of The Week";
- close;
- case 6:
- next;
- mes "[Map Of The Week]";
- mes "Come Back When You are free again";
- close;
- }
- OnWhisperGlobal:
- if(compare(@whispervar0$,"map")) {
- dispbottom "MOTW : The Map Of The Week is "+$MOTW$;
- end;
- }
- if(compare(@whispervar0$,"kills")) {
- if(#MOTWC != 1) goto MO_NoContract;
- mes "[Map Of The Week]";
- mes "You can still kill ^FF0000"+(@motwkill-#MOTWKI)+"^000000 monsters.!!";
- close;
- end;
- }
- if(compare(@whispervar0$,"contract")) {
- mes "[Map Of The Week]";
- mes "Do you want to buy a contract?";
- if(select("Yes:NO")-1) {
- mes "[Map Of The Week]";
- mes "So Long Looser";
- atcommand "@die";
- close;
- end;
- }
- else {
- mes "[Map Of The Week]";
- mes "It Would Cost ^FF0000"+@motwcost+" Zeny^000000 for ^FF0000"+@motwkill+" Kills^000000";
- if(select("Sure I Will Pay:No")-1) {
- mes "[Map Of The Week]";
- mes "So Long Looser";
- atcommand "@die";
- close;
- end;
- }
- else {
- if (Zeny < @motwcost) goto MO_NoZeny;
- set Zeny,Zeny-@motwcost;
- set #MOTWC, 1;
- set #MOTWKI, 0;
- mes "[Map Of The Week]";
- mes "Your contract has been signed";
- close;
- end;
- }
- }
- }
- if(compare(@whispervar0$,"gm")) {
- if(getgmlevel() < 90) end;
- mes "[Map Of The Week]";
- mes "What do you want to do "+strcharinfo(0)+"?";
- switch(select("^00FF00-^000000Random MOTW","^00FF00-^000000Enter MOTW","^FF0000-^000000Destroy All Contracts","^FF0000-^000000Nothing"))
- {
- case 1:
- switch(rand(3)){
- case 0:
- set $@MOTWS, rand(1,11);
- set $mapotw$, "pay_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Payon Forest "+$@MOTWS;
- break;
- case 1:
- set $@MOTWS, rand(0,11);
- set $mapotw$, "prt_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Prontera Field "+$@MOTWS;
- break;
- case 2:
- set $@MOTWS, rand(1,22);
- set $mapotw$, "moc_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Sograt Desert "+$@MOTWS;
- break;
- }
- announce "MOTW : The Map Of The Week is "+$MOTW$+"!! Every mob on that map has a chance to drop Bronze Coins which you can change for PODS.",0;
- next;
- mes "[Map Of The Week]";
- mes "The Map Of The Week is ^FF0000"+$MOTW$+"^000000!!!!";
- close;
- case 2:
- goto MOTW_Name;
- case 3:
- next;
- mes "[Map Of The Week]";
- mes "Destroyed All Contracts";
- query_sql "DELETE FROM global_reg_value where str = '#MOTWC'";
- query_sql "DELETE FROM global_reg_value where str = '#MOTWKI'";
- close;
- case 4:
- next;
- mes "[Map Of The Week]";
- mes "Come Back When You are free again";
- close;
- }
- }
- MO_Nothing:
- mes "[Map Of The Week]";
- mes "Available Keywords :";
- mes "^0000FF-^000000^FF0000kills^000000 : the no. of kills left";
- mes "^0000FF-^000000^FF0000contract^000000 : to renew or buy contract";
- mes "^0000FF-^000000^FF0000map^000000 : to know the Map Of The Week";
- close;
- end;
- MO_NoZeny:
- mes "[Map Of The Week]";
- mes "Come back when you have zeny";
- close;
- end;
- MO_NoContract:
- mes "[Map Of The Week]";
- mes "You are not under a contract";
- close;
- end;
- MO_ContractEnd:
- dispbottom "MOTW : Your contract is expired";
- set #MOTWC,0;
- end;
- MO_NoContractk:
- dispbottom "MOTW : You are not under a contract";
- end;
- MOTW_Name:
- mes "[Map Of The Week]";
- mes "Enter the map name";
- input $MOTWGM$;
- mes "The map you entered is ^FF0000"+$MOTWGM$+"^000000";
- mes "Is this the correct map";
- if(select("Yes:No")-1) {
- goto MOTW_Name;
- }
- else {
- set $mapotw$, $MOTWGM$;
- set $MOTW$, $MOTWGM$;
- announce "MOTW : The Map Of The Week is "+$MOTW$+"!!!!",0;
- close;
- end;
- }
- OnClock2400:
- if(gettime(4)!=0) end;
- switch(rand(3)){
- case 0:
- set $@MOTWS, rand(1,11);
- set $mapotw$, "pay_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Payon Forest "+$@MOTWS;
- break;
- case 1:
- set $@MOTWS, rand(0,11);
- set $mapotw$, "prt_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Prontera Field "+$@MOTWS;
- break;
- case 2:
- set $@MOTWS, rand(1,22);
- set $mapotw$, "moc_fild" + (($@MOTWS < 10)?"0":"") + $@MOTWS;
- set $MOTW$, "Sograt Desert "+$@MOTWS;
- break;
- }
- announce "MOTW : The Map Of The Week is "+$MOTW$+"!!!",0;
- end;
- OnNPCKillEvent:
- getmapxy(.@map$,.@x,.@y,0);
- if (.@map$ != $mapotw$) end;
- if (!#MOTWC) goto MO_NoContractk;
- if (#MOTWKI >= @motwkill) goto MO_ContractEnd;
- set #MOTWKI, #MOTWKI+1;
- switch(rand(10)){
- case 0:
- getitem 673,1;
- break;
- case 1:
- getitem 673,1;
- break;
- case 2:
- getitem 673,1;
- break;
- default:
- announce "MOTW : You Got Nothing HAHAH!!!",bc_yellow|bc_self;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement