xeijvro Posted May 20, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.01 Content Count: 24 Reputation: 0 Joined: 12/02/22 Last Seen: April 7 Share Posted May 20, 2024 I Was wondering how to fix this from points gift to corresponding item names Quote Link to comment Share on other sites More sharing options...
1 Chaos92 Posted May 21, 2024 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 5 hours ago Share Posted May 21, 2024 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 //===== 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; } 1 Quote Link to comment Share on other sites More sharing options...
0 Chaos92 Posted May 20, 2024 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 5 hours ago Share Posted May 20, 2024 1 hour ago, xeijvro said: I Was wondering how to fix this from points gift to corresponding item names didnt show your script ? should have option there. Quote Link to comment Share on other sites More sharing options...
0 xeijvro Posted May 20, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.01 Content Count: 24 Reputation: 0 Joined: 12/02/22 Last Seen: April 7 Author Share Posted May 20, 2024 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; } Quote Link to comment Share on other sites More sharing options...
0 xeijvro Posted May 20, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.01 Content Count: 24 Reputation: 0 Joined: 12/02/22 Last Seen: April 7 Author Share Posted May 20, 2024 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; } Quote Link to comment Share on other sites More sharing options...
0 xeijvro Posted May 21, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.01 Content Count: 24 Reputation: 0 Joined: 12/02/22 Last Seen: April 7 Author Share Posted May 21, 2024 Bump Quote Link to comment Share on other sites More sharing options...
0 xeijvro Posted May 21, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.01 Content Count: 24 Reputation: 0 Joined: 12/02/22 Last Seen: April 7 Author Share Posted May 21, 2024 34 minutes ago, Chaos92 said: ive changed some codes, the result should be like this //===== 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! Quote Link to comment Share on other sites More sharing options...
Question
xeijvro
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.