Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- //Coin Room By Ryax \\
- //~~~~~~~~~~~~~~~~~~~~~~\\
- //=============================================================================
- //Concept and initial coading by: rudolp
- //===== Compatible With: =================================================================
- //Any Rathena Version {build for eathena}
- //==================================================
- poring_w02.gat mapflag noskill
- poring_w02.gat mapflag nomemo
- poring_w02.gat mapflag nobranch
- poring_w02.gat mapflag noloot
- poring_w02.gat mapflag noexp
- poring_w02.gat mapflag nodrop
- poring_w02.gat mapflag novending
- poring_w02.gat mapflag nowarp
- poring_w02.gat mapflag nowarpto
- poring_w02.gat mapflag noreturn
- //=================================================
- poring_w02,0,0,0 script Poring Farm -1,{
- OnInit:
- //No. of Mine Guardian.
- //For golden peko it is default to 100 and 4 seconds~2 seconds spawn rate.
- set .guardian,50;
- //Type of guardian. 0 = normal 1 = extreme
- set .@guardiantype,0;
- if(.@guardiantype == 0){
- monster "poring_w02",0,0,"Farmer Bob",1949,.guardian,"";
- }else{
- monster "poring_w02",0,0,"Farmer Bruto",1950,.guardian,"";
- }
- end;
- OnNPCKillEvent:
- //===== Configurations: ========================================================================
- //Max coin can a player get after killing 1 poring (default 5 note:this will increase if luk bonus is enable).
- set .@maxgaincoin,5;
- //Apply coin penalty. 0 = no 1 = yes
- set .@penalty1,1;
- //The Maximum no. of coin Penalty.
- set .@maxpenalty1,3;
- //Apply speed & HP penalty. 0 = no 1 = yes
- set .@penalty2,1;
- //coin limitation penalty must be enable
- set .@maxcoin,200;
- //The maximum no. of hp penalty by %.
- set .@maxpenalty2,10;
- //Enable luk bonus. 0=no 1=yes
- set .@lukbonus,0;
- //If luk Bonus is enable,luk divider default 49 w/ 99 max parameter. Note: the quotient of your max parameter and .@lukdiv must not grater than 5 to avoid over Farming.
- set .@lukdiv,49;
- //Show Server Name. 0=no 1=yes
- set .@showservername,1;
- //Name of your Server
- set .@servername$,"[ServerNAME]";
- //=========================================================================================
- if (getmapxy(@mapname$,@mapx,@mapy,0) == -1) goto L_Finish;
- if (@mapname$ == "poring_w02"){
- set @bonus,0;
- set @deduction,0;
- set @gain,rand (.@maxgaincoin);
- //Luk bonus
- if (.@lukbonus != 0){
- set @bonus,readparam(bLuk)/.@lukdiv;
- }
- //coin Penalty
- if (.@penalty1 != 0){
- set @deduction,rand(.@maxpenalty1);
- if(@deduction == 0) set @deduction,1;
- }
- set @gain, @gain + @bonus - @deduction;
- set coin, coin + @gain ;
- //Displaying Gained coin
- if(.@showservername != 0){
- if(coin%5 == 0){ //Show Server Name every 10 coin gain.
- dispbottom "===============Brought to you by===============";
- dispbottom "==============" + .@servername$ +"==============";
- }
- }
- if(@gain){
- dispbottom "-|You got: " +@gain+ " coin| - |Total: " +coin+ " coin|- ";
- }else{
- dispbottom "-|You got: NOTHING! |- ";
- }
- if (.@penalty2 != 0){
- if (coin >= .@maxcoin/2 && coin <=.@maxcoin/2+20){
- sc_start SC_DECREASEAGI,240000,10;
- }else if(coin >.@maxcoin){
- sc_start SC_CURSE,240000,10;
- percentheal (.@maxpenalty2*-1),(.@maxpenalty2*-1);
- heal -50,0; //For him to die
- }
- }
- if(paid == 0){
- mapannounce "poring_w02"," x( "+strcharinfo(0)+" is a cheater!",bc_map;
- dispbottom "Go out you bastard!";
- set coin,0;
- warp "prontera", 173, 160;
- }
- end;
- }
- OnPCDieEvent:
- if (getmapxy(@mapname$,@mapx,@mapy,0) == -1) goto L_Finish;
- if (@mapname$ == "poring_w02"){
- dispbottom "Holy Shit you died!";
- dispbottom "All of your coin will gone!";
- set alive, 0;
- set paid, 0;
- end;
- }
- L_Finish:
- close;
- }
- //===============================================
- //warper
- //===============================================
- poring_w02,117,83,4 script coin Farmer 813,{
- mes "[coin Farmer]";
- if(coin >=2){
- goto wa;
- }
- mes "Want to go now?";
- mes "Your coin is just "+coin+" you can still get more.";
- close;
- wa:
- mes "Want to go now?";
- if(select("Yes", "No") == 1) {
- set alive,1;
- warp "prontera", 173, 160;
- }
- close;
- }
- prontera,165,158,5 script coin Room Warperer#pront 813,{
- set @name$,"prontera";
- callfunc "coinmain";
- end;
- }
- aldebaran,133,116,4 script coin Room Warperer#alde 813,{
- set @name$,"aldebaran";
- callfunc "coinmain";
- end;
- }
- alberta,23,247,4 script coin Room Warperer#alb 813,{
- set @name$,"alberta";
- callfunc "coinmain";
- end;
- }
- payon,151,182,4 script coin Room Warperer#pay 813,{
- set @name$,"payon";
- callfunc "coinmain";
- end;
- }
- geffen,115,74,4 script Farm Warper#gef 813,{
- set @name$,"geffen";
- callfunc "coinmain";
- end;
- }
- function script coinmain {
- if (getgmlevel() >= 90){
- mes "[Poring Farm Warper]";
- if(sex != 0){
- mes "Hello Sir what can I do for you?";
- }else{
- mes "Hello Maam what can I do for you?";
- }
- next;
- menu "Enter Farming Site",start,"Please close the Farm Site. Now!",-,"Please Open the Farm Site. Now!",G_open,"Nothing",C_s;
- next;
- mes "[Poring Farm Warper]";
- mapannounce "prontera","Excuse me Farmers.",bc_map;
- mes "Ok.";
- next;
- mapannounce "prontera",strcharinfo(0) +" wants to close the coin Room for a while",bc_map;
- mes "Just a second I will just ask them to";
- mes "go out in the Farming site";
- next;
- mapannounce "prontera","Please settle your things and move quitely",bc_map;
- mes "[Poring Farm Warper]";
- mes ".............";
- mes "........";
- next;
- mes "[Poring Farm Warper]";
- mes "Ok your done";
- set .opencoinroom,1;
- atcommand "@Doommap";
- close;
- }
- if(.opencoinroom == 0){
- goto start;
- }else{
- mes "[Poring Farm Warper]";
- mes "Sorry!";
- mes "The Farming Site is closed.";
- close;
- }
- G_open:
- mes "[Poring Farm Warper]";
- mes "Ok.";
- mes "Farming Site is Already Available.";
- announce " coin Room is open for public!",bc_map;
- set .opencoinroom,0;
- close;
- start:
- if ( alive == 0){
- set coin,0;
- }
- mes "[Poring Farm Warper]";
- mes "What do you want?";
- next;
- menu "To the coin Room",-,"Exchange coin",exchange,"Nothing",C_s;
- mes "[coin Room Warperer]";
- mes "Hmm..";
- mes "It cost 100,000z";
- mes "Would you like to go now to the coin room?";
- if(select("Yes", "No") == 1) {
- if(@name$ == "prontera") savepoint "prontera", 173, 160;
- if(@name$ == "aldebaran") savepoint "aldebaran",166, 163;
- if(@name$ == "alberta") savepoint "alberta",16, 246;
- if(@name$ == "payon") savepoint "payon",160, 179;
- if(@name$ == "geffen") savepoint "geffen",124, 85;
- if (Zeny < 100000) goto nomoney;
- set Zeny, Zeny - 100000;
- set alive, 1;
- set paid, 1;
- warp "poring_w02", 121, 83;
- }
- close;
- nomoney:
- mes "[Poring Farm Warper]";
- mes "Sorry insufficient balance";
- close;
- exchange:
- mes "[Poring Farm Warper]";
- mes "Hmm...let me see";
- mes "You have " +coin+ ".";
- if (coin == 0) goto nocoin;
- mes "Ok get this.";
- next;
- if (checkweight(7539,coin) == 0) goto L_OverWeight;
- getitem 7539, coin;
- set coin, 0;
- emotion e_gg;
- close;
- L_OverWeight:
- mes "[Poring Farm Warper]";
- mes "Sorry your overweight";
- close;
- nocoin:
- close;
- C_s:
- close;
- }
- //============================================================
- //===========================================================
- //========================================
- //========================================
- //============Spawns=================
- //-----------you can change this "100" value to the number of monsters you want--//
- poring_w02,0,0,0,0 monster Farm Poring 1002,100,40000,20000,0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement