Jump to content
  • 0

Help in fixing Official Hourly Shop


Question

6 answers to this question

Recommended Posts

  • 1
Posted
17 hours ago, xeijvro said:

//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================

prontera,0,0,0    script    Goldpoint Manager::GOLDPCCAFE    4_F_02,{
    // ID:AMOUNT:PRICE
    setarray .items$[1],
        "14003:5:3", // World_Tour_Ticket 1
        "13607:1:15",  // K_Secret_Key 1
        "23919:11:100",// K_Secret_Key 11
        "23919:33:300";// K_Secret_Key 33

    mes "[Goldpoint Manager]";
    mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
    mes "What reward do you want?";
    next;

    .@menu$ = "View current points";

    for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
        explode(.@array$, .items$[.@i], ":");
        .@cost = atoi(.@array$[2]);
        .@menu$ += ":" + .@cost + " points gift";
        if( Goldpc_Points < .@cost ){
            .@menu$ += " ^ff0000(not enough points)^000000";
        }
    }

    .@s = select(.@menu$)-1;

    if(.@s == 0) {
        mes "[Goldpoint Manager]";
        mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
        close;
    }

    explode(.@array$, .items$[.@s], ":");
    .@itemid = atoi(.@array$[0]);
    .@amount = atoi(.@array$[1]);
    .@cost = atoi(.@array$[2]);

    if(Goldpc_Points < .@cost) {
        mes "[Goldpoint Manager]";
        mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
        mes "You cannot get the prize with this amount of points.";
        close;
    }

    mes "[Goldpoint Manager]";
    mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
    Goldpc_Points -= .@cost;
    getitem .@itemid,.@amount;
    mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
    close;
}

ive changed some codes, the result should be like this

image.png.cfc28d78ba3e0094084afaa33851bbf3.png

//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================

prontera,155,168,3	script	Goldpoint Manager::GOLDPCCAFE	4_F_02,{
    // ID:AMOUNT:PRICE
    setarray .items$[1],
        "14003:5:3", // World_Tour_Ticket 1
        "13607:1:15",  // K_Secret_Key 1
        "23919:11:100",// K_Secret_Key 11
        "23919:33:300";// K_Secret_Key 33

    mes "[Goldpoint Manager]";
    mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
    mes "What reward do you want?";
    next;

    .@menu$ = "View current points";

    for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
        explode(.@array$, .items$[.@i], ":");
        .@itemid = atoi(.@array$[0]);
        .@cost = atoi(.@array$[2]);
        .@menu$ += ":" + getitemname(.@itemid) + " (" + .@cost + " points)";
        if( Goldpc_Points < .@cost ){
            .@menu$ += " ^ff0000(not enough points)^000000";
        }
    }

    .@s = select(.@menu$)-1;

    if(.@s == 0) {
        mes "[Goldpoint Manager]";
        mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
        close;
    }

    explode(.@array$, .items$[.@s], ":");
    .@itemid = atoi(.@array$[0]);
    .@amount = atoi(.@array$[1]);
    .@cost = atoi(.@array$[2]);

    if(Goldpc_Points < .@cost) {
        mes "[Goldpoint Manager]";
        mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
        mes "You cannot get the prize with this amount of points.";
        close;
    }

    mes "[Goldpoint Manager]";
    mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
    Goldpc_Points -= .@cost;
    getitem .@itemid,.@amount;
    mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
    close;
}

 

  • Upvote 1
  • 0
Posted
1 hour ago, xeijvro said:

image.png.b796c522eeec471e930c1cba586e4599.pngI Was wondering how to fix this from points gift to corresponding item names

 

didnt show your script ? should have option there.

  • 0
Posted

Here is the script i am using

 

 

//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================

prontera,0,0,0    script    Goldpoint Manager::GOLDPCCAFE    4_F_02,{
    // ID:AMOUNT:PRICE
    setarray .items$[1],
        "14003:5:3", // World_Tour_Ticket 1
        "13607:1:15",  // K_Secret_Key 1
        "23919:11:100",// K_Secret_Key 11
        "23919:33:300";// K_Secret_Key 33

    mes "[Goldpoint Manager]";
    mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
    mes "What reward do you want?";
    next;

    .@menu$ = "View current points";

    for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
        explode(.@array$, .items$[.@i], ":");
        .@cost = atoi(.@array$[2]);
        .@menu$ += ":" + .@cost + " points gift";
        if( Goldpc_Points < .@cost ){
            .@menu$ += " ^ff0000(not enough points)^000000";
        }
    }

    .@s = select(.@menu$)-1;

    if(.@s == 0) {
        mes "[Goldpoint Manager]";
        mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
        close;
    }

    explode(.@array$, .items$[.@s], ":");
    .@itemid = atoi(.@array$[0]);
    .@amount = atoi(.@array$[1]);
    .@cost = atoi(.@array$[2]);

    if(Goldpc_Points < .@cost) {
        mes "[Goldpoint Manager]";
        mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
        mes "You cannot get the prize with this amount of points.";
        close;
    }

    mes "[Goldpoint Manager]";
    mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
    Goldpc_Points -= .@cost;
    getitem .@itemid,.@amount;
    mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
    close;
}

  • 0
Posted
8 minutes ago, Chaos92 said:

didnt show your script ? should have option there.

//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================

prontera,0,0,0    script    Goldpoint Manager::GOLDPCCAFE    4_F_02,{
    // ID:AMOUNT:PRICE
    setarray .items$[1],
        "14003:5:3", // World_Tour_Ticket 1
        "13607:1:15",  // K_Secret_Key 1
        "23919:11:100",// K_Secret_Key 11
        "23919:33:300";// K_Secret_Key 33

    mes "[Goldpoint Manager]";
    mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
    mes "What reward do you want?";
    next;

    .@menu$ = "View current points";

    for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
        explode(.@array$, .items$[.@i], ":");
        .@cost = atoi(.@array$[2]);
        .@menu$ += ":" + .@cost + " points gift";
        if( Goldpc_Points < .@cost ){
            .@menu$ += " ^ff0000(not enough points)^000000";
        }
    }

    .@s = select(.@menu$)-1;

    if(.@s == 0) {
        mes "[Goldpoint Manager]";
        mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
        close;
    }

    explode(.@array$, .items$[.@s], ":");
    .@itemid = atoi(.@array$[0]);
    .@amount = atoi(.@array$[1]);
    .@cost = atoi(.@array$[2]);

    if(Goldpc_Points < .@cost) {
        mes "[Goldpoint Manager]";
        mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
        mes "You cannot get the prize with this amount of points.";
        close;
    }

    mes "[Goldpoint Manager]";
    mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
    Goldpc_Points -= .@cost;
    getitem .@itemid,.@amount;
    mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
    close;
}

  • 0
Posted
34 minutes ago, Chaos92 said:

ive changed some codes, the result should be like this

image.png.cfc28d78ba3e0094084afaa33851bbf3.png

//===== rAthena Script =======================================
//= Gold PC Bonus NPC
//===== Description: =========================================
//= NPC that can be spawned via the Gold PC Timer Button.
//===== Changelog: ===========================================
//= 1.0 Initial release [Lemongrass]
//= 1.1 Replay version [eppc0330]
//= 1.2 Translation of the replay version [Lemongrass]
//= 1.3 Cleanup of NPC logic [Lemongrass]
//= 1.4 Added replay version of buff NPC [eppc0330]
//============================================================

prontera,155,168,3	script	Goldpoint Manager::GOLDPCCAFE	4_F_02,{
    // ID:AMOUNT:PRICE
    setarray .items$[1],
        "14003:5:3", // World_Tour_Ticket 1
        "13607:1:15",  // K_Secret_Key 1
        "23919:11:100",// K_Secret_Key 11
        "23919:33:300";// K_Secret_Key 33

    mes "[Goldpoint Manager]";
    mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
    mes "What reward do you want?";
    next;

    .@menu$ = "View current points";

    for(.@i = 1; .@i < getarraysize(.items$); .@i++) {
        explode(.@array$, .items$[.@i], ":");
        .@itemid = atoi(.@array$[0]);
        .@cost = atoi(.@array$[2]);
        .@menu$ += ":" + getitemname(.@itemid) + " (" + .@cost + " points)";
        if( Goldpc_Points < .@cost ){
            .@menu$ += " ^ff0000(not enough points)^000000";
        }
    }

    .@s = select(.@menu$)-1;

    if(.@s == 0) {
        mes "[Goldpoint Manager]";
        mes "You currently have ^0000ff"+Goldpc_Points+"^000000 points.";
        close;
    }

    explode(.@array$, .items$[.@s], ":");
    .@itemid = atoi(.@array$[0]);
    .@amount = atoi(.@array$[1]);
    .@cost = atoi(.@array$[2]);

    if(Goldpc_Points < .@cost) {
        mes "[Goldpoint Manager]";
        mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
        mes "You cannot get the prize with this amount of points.";
        close;
    }

    mes "[Goldpoint Manager]";
    mes "You chose the "+.@cost+" points gift. We will reward you immediately.";
    Goldpc_Points -= .@cost;
    getitem .@itemid,.@amount;
    mes "You have ^0000ff"+Goldpc_Points+"^000000 points remaining.";
    close;
}

 

Works like a charm thanks! 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...