Jump to content
  • 0

DONATION NPC AND POINTS


mervz02

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  09/29/16
  • Last Seen:  

Hi, im making this Donation NPC manager work, but apparently some menus are missing, i want to enable and test the Exlusive Donation and the conversion of the Donation Tickets and points. how can i do it. 

 

//==== DarkRO Scripts ====================================
//= Donation Shop
//===== By: ================================================== 
//= [GM] Brenth
//===== Current Version: ===================================== 
//= 1.2
//===== Description: ========================================= 
//= Multiple donation shop rewards (based on DarkRO)
//===== Changelog: =========================================== 
//= Not yet tested for bugs
//= 1.0 Implementation
//= 1.1 Added Gift Packages
//= 1.2 Added Claim Bonuses (Ticket and Points)
//============================================================

//auction_01,41,85,5    script    Donation Manager    4_M_IAN,{
prontera,133,188,5    script    Donation Manager    4_M_LGTGRAND,{
    set @header$,"[^FF8000 Donation Manager ^000000]";
    mes @header$; 
    mes "Good Day " + (Sex ? "Boss!" : "Madam!");
    mes "Welcome to Donation Shop!";
    mes "  ";
    mes "For every 1$ USD you donate, you will receive 1 ^5FD1D1Donation Point^000000 and 1 ^5FD1D1Wager Point^000000.";
    next;
    mes @header$; 
    mes "Just a few information before you visit our shop.";
    mes "  ";
    mes "We have 2 different kind of donation rewards and 2 different kind of shop, you will received";
    mes "both ^5FD1D1Donation Points^000000 and ^5FD1D1Wager Points^000000 everytime you donate!";
    switch(select(
        "Donation Points Shop",
        "Wager Points Shop",
        ($DONATE_EXCLUSIVE ? "[^FF0000Exclusive^000000] "+$DONATE_EX_TITLE$:""))) {
/*        (#CASHPOINTS > 99 ? "Convert Wager Points to Donation Ticket":""))) {
    case 1:
        mes @header$;
        mes "Each Gift Packs contains different items and amount of ^7BCC70Donation Tickets^000000 and ^7BCC70Bonus Points^000000.";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely.";
        openshop("DShop_Pack");
        end;
    case 2:
        mes @header$;
        mes "We have 2 different kind of donation rewards, you received both ^7BCC70Donation Tickets^000000 and ^7BCC70Bonus Points^000000 everytime you open a Gift Package!";
        next;
        switch(select("Use Donation Tickets:Use Bonus Points")) {
*/
        case 1:
            mes @header$;
            mes "Welcome to Donation Points Shop";
            mes "You have total of "+#DONATIONPOINTS+" ^7BCC70Donation Points^000000.";
            openshop("DShop_Ticket");
            end;
        case 2: 
            mes @header$;
            mes "Welcome to Bonus Points Shop";
            mes "You have total of "+#BONUSPOINTS+" ^7BCC70Bonus Points^000000.";
            mes " ";
            mes "This shop rotates every end of the month.";
            openshop("DShop_Bonus");
            end;
        case 3:
            mes @header$;
            mes "Welcome to the Exclusive Donation Shop.";
            mes " ";
            mes "Select what currency will you use.";
            next;
            switch(select(
                $DONATE_EXDT ? "Donation Ticket Shop":"",
                $DONATE_EXBP ? "Bonus Point Shop":"",
                "Cancel")) {
                default:    close;    break;
                case 1:
                    openshop("DShop_Ticket_Ex");
                    end;
                case 2:
                    openshop("DShop_Bonus_Ex");
                    end;        
            }
            break;
/*    case 4:
        getinventorylist();
        mes @header$;
        mes "You can convert your ^0000FF100 Wager Points^000000 for ^0099001 Donation Ticket^000000.";
        mes " ";
        mes "How will you exchange your Wager Point?";
        next;
        .@i = select("Decide on how many tickets to get.:Exchange all my Wager Points.:Cancel");
        if (.@i == 3) close();
        else if (.@i == 1) {
            if (@inventorylist_count == MAX_INVENTORY && !countitem(3101)) {
                mes @header$;
                mes "Make sure that you have a cleared your inventory before proceeding.";
                close();
            }
            mes @header$;
            mes "You have total of "+F_InsertComma(#CASHPOINTS)+" ^0000FFWager Points^000000.";
            mes " ";
            mes "How many ^009900Donation Ticket^000000 do you want to get?";
            next;
            input(.@amt,0,30000);
            if (.@amt <= 0) close();
            if (#CASHPOINTS/100 < .@amt) {
                L_LessPoints:
                mes @header$;
                mes "You don't have enough Wager Points.";
                close();
            }
            else if (countitem(3101) + .@amt > 30000) {
                mes @header$;
                mes "You have exceeded the limit.";
                close();
            } else {
                L_ConvertDP:
                mes @header$;
                mes "You will be converting";
                mes "your ^0000FF"+F_InsertComma(.@amt * 100)+" Wager Points^000000";
                mes "to ^009900"+F_InsertComma(.@amt)+" Donation Ticket"+(.@amt != 1 ? "s":"")+"^000000.";
                mes " ";
                mes "Proceed?";
                next;
                if (select("No:Yes") == 1) close();
                #CASHPOINTS -= (.@amt * 100);
                #DONATIONPOINTS += .@amt;
                getitem 3101, .@amt;
                mes @header$;
                mes "Here's your ^009900"+F_InsertComma(.@amt)+" Donation Ticket"+(.@amt != 1 ? "s":"")+"^000000 and ^0000FFBonus Point"+(.@amt != 1 ? "s":"")+"^000000.";
                close();
            }
        } else {
            if (@inventorylist_count == MAX_INVENTORY && !countitem(3101)) {
                mes @header$;
                mes "Make sure that you have a cleared your inventory before proceeding.";
                close();
            }
            .@amt = #CASHPOINTS / 100;
            if (.@amt == 0) goto L_LessPoints;
            else if (countitem(3101) + .@amt > 30000) {
                .@amt = 30000 - countitem(3101);
                if (.@amt == 0) {
                    mes @header$;
                    mes "You have exceeded the limit.";
                    close();
                }
                else goto L_ConvertDP;
            }
            else goto L_ConvertDP;
        }
        break;
*/
    }
    close;

OnInit:
    waitingroom "Donation Manager",0;
    end;
}

-    trader    DShop_Ticket_Ex    -1,{
OnInit:
    tradertype(NST_CUSTOM);
    sellitem Red_Potion,1;
    end;

OnCountFunds:
    setcurrency(#DONATIONPOINTS); end;

OnPayFunds:
    if( #DONATIONPOINTS < @price ) end;
    #DONATIONPOINTS = #DONATIONPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#DONATIONPOINTS+" Donation Points.";
    end;
}

-    trader    DShop_Bonus_Ex    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Red_Potion,200;
    end;

OnCountFunds:
    setcurrency(#BONUSPOINTS); end;

OnPayFunds:
    if( #BONUSPOINTS < @price ) end;
    #BONUSPOINTS = #BONUSPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#BONUSPOINTS+" Bonus Points.";
    end;
}

/*
-    trader    DShop_Pack    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Gift_Pack_1,2500;
    sellitem Gift_Pack_2,3000;
    sellitem Gift_Pack_3,3500;
    sellitem Gift_Pack_4,4500;
    end;
    
OnCountFunds:
    setcurrency(#CASHPOINTS); end;

OnPayFunds:
    if( #CASHPOINTS < @price ) end;
    #CASHPOINTS = #CASHPOINTS - @price;
    purchaseok(); end;
}
*/

-    trader    DShop_Ticket    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Banryu,12;
    sellitem Valkyrie_Armor,14;
    sellitem Valkyrja's_Shield,10;
    sellitem Valkyrie_Shoes,10;
    sellitem Valkyrie_Manteau,15;
    sellitem Sleipnir,20;
    sellitem Valkyrie_Helm_,20;
    sellitem Cyclops_Visor,30;
    sellitem Vampire_Wings,40;
    sellitem Nile_Rose,15;
    end;

OnCountFunds:
    setcurrency(#DONATIONPOINTS); end;

OnPayFunds:
    if( #DONATIONPOINTS < @price ) end;
    #DONATIONPOINTS = #DONATIONPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#DONATIONPOINTS+" Donation Points.";
    end;
}

-    trader    DShop_Bonus    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    // Hats rotates
    sellitem Chanel_Captain,80;
    sellitem Gucci_Captain,80;
    sellitem LV_Captain,80;
    sellitem Chanel_Note_Headphone,80;
    sellitem Gucci_Note_Headphone,80;
    sellitem LV_Note_Headphone,80;
    end;
    
OnCountFunds:
    setcurrency(#BONUSPOINTS); end;

OnPayFunds:
    if( #BONUSPOINTS < @price ) end;
    #BONUSPOINTS = #BONUSPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#BONUSPOINTS+" Bonus Points.";
    end;
}


 

donationshop.txt

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  642
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

19 hours ago, mervz02 said:

Hi, im making this Donation NPC manager work, but apparently some menus are missing, i want to enable and test the Exlusive Donation and the conversion of the Donation Tickets and points. how can i do it. 

 

//==== DarkRO Scripts ====================================
//= Donation Shop
//===== By: ================================================== 
//= [GM] Brenth
//===== Current Version: ===================================== 
//= 1.2
//===== Description: ========================================= 
//= Multiple donation shop rewards (based on DarkRO)
//===== Changelog: =========================================== 
//= Not yet tested for bugs
//= 1.0 Implementation
//= 1.1 Added Gift Packages
//= 1.2 Added Claim Bonuses (Ticket and Points)
//============================================================

//auction_01,41,85,5    script    Donation Manager    4_M_IAN,{
prontera,133,188,5    script    Donation Manager    4_M_LGTGRAND,{
    set @header$,"[^FF8000 Donation Manager ^000000]";
    mes @header$; 
    mes "Good Day " + (Sex ? "Boss!" : "Madam!");
    mes "Welcome to Donation Shop!";
    mes "  ";
    mes "For every 1$ USD you donate, you will receive 1 ^5FD1D1Donation Point^000000 and 1 ^5FD1D1Wager Point^000000.";
    next;
    mes @header$; 
    mes "Just a few information before you visit our shop.";
    mes "  ";
    mes "We have 2 different kind of donation rewards and 2 different kind of shop, you will received";
    mes "both ^5FD1D1Donation Points^000000 and ^5FD1D1Wager Points^000000 everytime you donate!";
    switch(select(
        "Donation Points Shop",
        "Wager Points Shop",
        ($DONATE_EXCLUSIVE ? "[^FF0000Exclusive^000000] "+$DONATE_EX_TITLE$:""))) {
/*        (#CASHPOINTS > 99 ? "Convert Wager Points to Donation Ticket":""))) {
    case 1:
        mes @header$;
        mes "Each Gift Packs contains different items and amount of ^7BCC70Donation Tickets^000000 and ^7BCC70Bonus Points^000000.";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely.";
        openshop("DShop_Pack");
        end;
    case 2:
        mes @header$;
        mes "We have 2 different kind of donation rewards, you received both ^7BCC70Donation Tickets^000000 and ^7BCC70Bonus Points^000000 everytime you open a Gift Package!";
        next;
        switch(select("Use Donation Tickets:Use Bonus Points")) {
*/
        case 1:
            mes @header$;
            mes "Welcome to Donation Points Shop";
            mes "You have total of "+#DONATIONPOINTS+" ^7BCC70Donation Points^000000.";
            openshop("DShop_Ticket");
            end;
        case 2: 
            mes @header$;
            mes "Welcome to Bonus Points Shop";
            mes "You have total of "+#BONUSPOINTS+" ^7BCC70Bonus Points^000000.";
            mes " ";
            mes "This shop rotates every end of the month.";
            openshop("DShop_Bonus");
            end;
        case 3:
            mes @header$;
            mes "Welcome to the Exclusive Donation Shop.";
            mes " ";
            mes "Select what currency will you use.";
            next;
            switch(select(
                $DONATE_EXDT ? "Donation Ticket Shop":"",
                $DONATE_EXBP ? "Bonus Point Shop":"",
                "Cancel")) {
                default:    close;    break;
                case 1:
                    openshop("DShop_Ticket_Ex");
                    end;
                case 2:
                    openshop("DShop_Bonus_Ex");
                    end;        
            }
            break;
/*    case 4:
        getinventorylist();
        mes @header$;
        mes "You can convert your ^0000FF100 Wager Points^000000 for ^0099001 Donation Ticket^000000.";
        mes " ";
        mes "How will you exchange your Wager Point?";
        next;
        .@i = select("Decide on how many tickets to get.:Exchange all my Wager Points.:Cancel");
        if (.@i == 3) close();
        else if (.@i == 1) {
            if (@inventorylist_count == MAX_INVENTORY && !countitem(3101)) {
                mes @header$;
                mes "Make sure that you have a cleared your inventory before proceeding.";
                close();
            }
            mes @header$;
            mes "You have total of "+F_InsertComma(#CASHPOINTS)+" ^0000FFWager Points^000000.";
            mes " ";
            mes "How many ^009900Donation Ticket^000000 do you want to get?";
            next;
            input(.@amt,0,30000);
            if (.@amt <= 0) close();
            if (#CASHPOINTS/100 < .@amt) {
                L_LessPoints:
                mes @header$;
                mes "You don't have enough Wager Points.";
                close();
            }
            else if (countitem(3101) + .@amt > 30000) {
                mes @header$;
                mes "You have exceeded the limit.";
                close();
            } else {
                L_ConvertDP:
                mes @header$;
                mes "You will be converting";
                mes "your ^0000FF"+F_InsertComma(.@amt * 100)+" Wager Points^000000";
                mes "to ^009900"+F_InsertComma(.@amt)+" Donation Ticket"+(.@amt != 1 ? "s":"")+"^000000.";
                mes " ";
                mes "Proceed?";
                next;
                if (select("No:Yes") == 1) close();
                #CASHPOINTS -= (.@amt * 100);
                #DONATIONPOINTS += .@amt;
                getitem 3101, .@amt;
                mes @header$;
                mes "Here's your ^009900"+F_InsertComma(.@amt)+" Donation Ticket"+(.@amt != 1 ? "s":"")+"^000000 and ^0000FFBonus Point"+(.@amt != 1 ? "s":"")+"^000000.";
                close();
            }
        } else {
            if (@inventorylist_count == MAX_INVENTORY && !countitem(3101)) {
                mes @header$;
                mes "Make sure that you have a cleared your inventory before proceeding.";
                close();
            }
            .@amt = #CASHPOINTS / 100;
            if (.@amt == 0) goto L_LessPoints;
            else if (countitem(3101) + .@amt > 30000) {
                .@amt = 30000 - countitem(3101);
                if (.@amt == 0) {
                    mes @header$;
                    mes "You have exceeded the limit.";
                    close();
                }
                else goto L_ConvertDP;
            }
            else goto L_ConvertDP;
        }
        break;
*/
    }
    close;

OnInit:
    waitingroom "Donation Manager",0;
    end;
}

-    trader    DShop_Ticket_Ex    -1,{
OnInit:
    tradertype(NST_CUSTOM);
    sellitem Red_Potion,1;
    end;

OnCountFunds:
    setcurrency(#DONATIONPOINTS); end;

OnPayFunds:
    if( #DONATIONPOINTS < @price ) end;
    #DONATIONPOINTS = #DONATIONPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#DONATIONPOINTS+" Donation Points.";
    end;
}

-    trader    DShop_Bonus_Ex    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Red_Potion,200;
    end;

OnCountFunds:
    setcurrency(#BONUSPOINTS); end;

OnPayFunds:
    if( #BONUSPOINTS < @price ) end;
    #BONUSPOINTS = #BONUSPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#BONUSPOINTS+" Bonus Points.";
    end;
}

/*
-    trader    DShop_Pack    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Gift_Pack_1,2500;
    sellitem Gift_Pack_2,3000;
    sellitem Gift_Pack_3,3500;
    sellitem Gift_Pack_4,4500;
    end;
    
OnCountFunds:
    setcurrency(#CASHPOINTS); end;

OnPayFunds:
    if( #CASHPOINTS < @price ) end;
    #CASHPOINTS = #CASHPOINTS - @price;
    purchaseok(); end;
}
*/

-    trader    DShop_Ticket    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    sellitem Banryu,12;
    sellitem Valkyrie_Armor,14;
    sellitem Valkyrja's_Shield,10;
    sellitem Valkyrie_Shoes,10;
    sellitem Valkyrie_Manteau,15;
    sellitem Sleipnir,20;
    sellitem Valkyrie_Helm_,20;
    sellitem Cyclops_Visor,30;
    sellitem Vampire_Wings,40;
    sellitem Nile_Rose,15;
    end;

OnCountFunds:
    setcurrency(#DONATIONPOINTS); end;

OnPayFunds:
    if( #DONATIONPOINTS < @price ) end;
    #DONATIONPOINTS = #DONATIONPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#DONATIONPOINTS+" Donation Points.";
    end;
}

-    trader    DShop_Bonus    -1,{
    OnInit:
    tradertype(NST_CUSTOM);
    // Hats rotates
    sellitem Chanel_Captain,80;
    sellitem Gucci_Captain,80;
    sellitem LV_Captain,80;
    sellitem Chanel_Note_Headphone,80;
    sellitem Gucci_Note_Headphone,80;
    sellitem LV_Note_Headphone,80;
    end;
    
OnCountFunds:
    setcurrency(#BONUSPOINTS); end;

OnPayFunds:
    if( #BONUSPOINTS < @price ) end;
    #BONUSPOINTS = #BONUSPOINTS - @price;
    purchaseok();
    dispbottom "You now have a total of "+#BONUSPOINTS+" Bonus Points.";
    end;
}


 

donationshop.txt 7.01 kB · 2 downloads

Some menus are hidden because of the /* script_here */. Those are comments. Try to remove those /* */


P.S and this script is for Herc. We don't have tradershop in rA.

Edited by Gidz Cross
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...