Jump to content
  • 0
myserver

convert to cashpoint

Question

Spoiler

//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

prontera,142,228,6    script    Find the Mushroom    1084,{
    mes "[ Find The Mushroom ]";
    if (.status == 1) {
        [email protected] = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
        if ([email protected] > 0) {
            mes "There are " + [email protected] + " Mushrooms left in " + .event_map$ + "!";
            mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
            close;
        }
        .event_map$ = "";
        .status = 0;
        mes "All the mushrooms are killed?";
    }
    mes "There is no event at the moment!";
    if (.status || getgmlevel() < .GM) close;
    mes "Start the event?";
    next;
    if (select("- No:- Yes") == 1) close;
    donpcevent strnpcinfo(0) + "::OnMinute10";
    mes "[ Find The Mushroom ]";
    mes "Event started!";
    close;

OnInit:
    .prize = 512;    // Reward item ID
    .amount = 10;    // Reward item amount
    .GM = 60;        // GM level required to access NPC
    setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
    end;

OnMinute10:    // Start time (every hour)
    if (.status) end;
    .status = 1;
    [email protected] = rand(1,10);    // How many Mushrooms should spawn?
    .event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
    [email protected]$ = strnpcinfo(0) + "::OnMobKilled";
    killmonster .event_map$, [email protected]$;
    monster .event_map$,0,0,"Please don't kill me!",1084,[email protected], [email protected]$;
    announce "Find the Mushroom : Total of " + [email protected] + " Mushrooms have been spawned in " + .event_map$ + "!",0;
    sleep 2500;
    announce "Find the Mushroom : Every Mushroom you kill will give you " + getitemname(.prize) + "!",0;
    end;

OnMobKilled:
    if (playerattached() == 0)
        end;
    getitem .prize, .amount;
    [email protected] = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
    if ([email protected] > 0)
        announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + [email protected] + " Mushroom(s) left.",bc_map;
    else {
        announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
        .status = 0;
        .event_map$ = "";
    }
    end;
}
 

 

how to convert the reward to cash point

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
.amount = 10;    // Reward CASHPOINTS amount

and change

announce "Find the Mushroom : Every Mushroom you kill will give you " + getitemname(.prize) + "!",0;

to

 announce "Find the Mushroom : Every Mushroom you kill will give you " +.amount+ " Cashpoints!",0;

and change

getitem .prize, .amount;

to

#CASHPOINTS+ = .amount;

 

Link to comment
Share on other sites

  • 1

just a simple code, you can fix it


 
//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

prontera,142,228,6	script	Find the Mushroom	1084,{

    mes "[Find The Mushroom]";
    if (.status == 1) {
        [email protected]count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
        if ([email protected]count > 0) {
            mes "There are " + [email protected]count + " Mushrooms left in " + .event_map$ + "!";
            mes "Find and kill the mushrooms to gain Cash Points!";
            close;
        }
        .event_map$ = "";
        .status = 0;
        mes "All the mushrooms are killed?";
    }
    mes "There is no event at the moment!";
    if (.status || getgmlevel() < .GM) close;
    mes "Start the event?";
    next;
    if (select("- No:- Yes") == 1) close;
    donpcevent strnpcinfo(0) + "::OnMinute10";
    mes "[ Find The Mushroom ]";
    mes "Event started!";
    close;

OnInit:
    .amount = 10;    // Reward CASHPOINTS amount
    .GM = 60;        // GM level required to access NPC
    setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
    end;

OnMinute10:    // Start time (every hour)
    if (.status) end;
    .status = 1;
    [email protected]spawn = rand(1,10);    // How many Mushrooms should spawn?
    .event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
    [email protected]label$ = strnpcinfo(0) + "::OnMobKilled";
    killmonster .event_map$, [email protected]label$;
    monster .event_map$,0,0,"Please don't kill me!",1084,[email protected]spawn, [email protected]label$;
    announce "Find the Mushroom : Total of " + [email protected]spawn + " Mushrooms have been spawned in " + .event_map$ + "!",0;
    sleep 2500;
    announce "Find the Mushroom : Every Mushroom you kill will give you "+.amount+" Cashpoints!",0;
    end;

OnMobKilled:
    if (playerattached() == 0)
        end;
    #CASHPOINTS+ = .amount;
    [email protected]spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
    if ([email protected]spawn > 0)
        announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + [email protected]spawn + " Mushroom(s) left.",bc_map;
    else {
        announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
        .status = 0;
        .event_map$ = "";
    }
    end;
}


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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