Noctis Posted January 12, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Share Posted January 12, 2017 First, yes, i searched first before, i tested all scripts of npcs who give vip for cash here in rathena and hercules, and no one works (for me), so plz, someone have a npc script who give vip days for cash plz? Quote Link to comment Share on other sites More sharing options...
0 Chaos92 Posted January 13, 2017 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 2 hours ago Share Posted January 13, 2017 just use cash daily script.. but use VIP check.. ehmm.. - script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer60000: set @minute, @minute + 1; if(@minute == 1440) && (vip_status(1) { set @minute,0; set .@point_amt, 5; //Points to get every 24 hour set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" Cash points by staying ingame for 24 hour"; dispbottom "Current Balance = "+#CASHPOINTS+" Cash points"; set @consecutive_hour, @consecutive_hour + 1; } stopnpctimer; initnpctimer; end; } //--End of the Script Didnt test it yet, but give a try Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 18 hours ago, Exmas said: give vip days for cash If you mean exchanging Cash Points for extra VIP days, the above script won't work. A simple NPC that adds VIP time and subtracts #CASHPOINTS is very easy to make. prontera,100,100,5 script CashToVIP 123,{ .@cashperday = 100; mes "["+ strnpcinfo(1)+"]"; if(#CASHPOINTS == 0){ mes "You need Cash Points in order to buy VIP time"; close; } switch(vip_status(1)){ case 0: mes "You're not a VIP"; break; case 1: mes "You are a VIP"; break; } mes "You currently have "+ #CASHPOINTS +" Cash Points."; mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000"; next; mes "["+ strnpcinfo(1)+"]"; if( #CASHPOINTS < .@cashperday ){ mes "You don't have enough Cash Points to purchase VIP Days"; close; } else { mes "Would you like to purchase/increase your VIP Days?"; switch(select(" - Nope: - Yeah!")){ case 1: break; case 2: #CASHPOINTS -= .@cashperday; vip_time 1440; dispbottom "Current Cash Points: "+ #CASHPOINTS; dispbottom "VIP Expires: "+ vip_status(2); break; } close; } } 1 Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted January 13, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted January 13, 2017 1 hour ago, Akkarin said: If you mean exchanging Cash Points for extra VIP days, the above script won't work. A simple NPC that adds VIP time and subtracts #CASHPOINTS is very easy to make. prontera,100,100,5 script CashToVIP 123,{ .@cashperday = 100; mes "["+ strnpcinfo(1)+"]"; if(#CASHPOINTS == 0){ mes "You need Cash Points in order to buy VIP time"; close; } switch(vip_status(1)){ case 0: mes "You're not a VIP"; break; case 1: mes "You are a VIP"; break; } mes "You currently have "+ #CASHPOINTS +" Cash Points."; mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000"; next; mes "["+ strnpcinfo(1)+"]"; if( #CASHPOINTS < .@cashperday ){ mes "You don't have enough Cash Points to purchase VIP Days"; close; } else { mes "Would you like to purchase/increase your VIP Days?"; switch(select(" - Nope: - Yeah!")){ case 1: break; case 2: #CASHPOINTS - .@cashperday; vip_time 1440; dispbottom "Current Cash Points: "+ #CASHPOINTS; dispbottom "VIP Expires: "+ vip_status(2); break; } close; } } tried that one yesterday but i have this error Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 2 hours ago, Exmas said: #CASHPOINTS - .@cashperday; I'm a tool. Should be -= or replace that line with this if you want to look them up in the command logs too: atcommand "@cash -" + .@cashperday; I also just did a quick search on the forums because i'm sure i've already seem something similar and found this: Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted January 13, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted January 13, 2017 2 hours ago, Akkarin said: I'm a tool. Should be -= or replace that line with this if you want to look them up in the command logs too: atcommand "@cash -" + .@cashperday; I also just did a quick search on the forums because i'm sure i've already seem something similar and found this: I put the atcommand "@cash -" + .@cashperday; and it worked, but Now Happen this Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 Have you enabled VIP script execution? https://github.com/rathena/rathena/blob/master/src/config/core.h#L70 Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted January 13, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted January 13, 2017 6 minutes ago, Akkarin said: Have you enabled VIP script execution? https://github.com/rathena/rathena/blob/master/src/config/core.h#L70 /// Uncomment to enable VIP system. //#define VIP_ENABLE /// Enable VIP script changes? (requires VIP_ENABLE) /// The primary effects of this are restrictions on non-VIP players, such as requiring /// a Reset Stone to change into third classes, paying more for equipment upgrades, and /// so forth. Note that the changes are based on euRO, not iRO. #define VIP_SCRIPT 0 Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 You don't even have VIP enabled.. Remove the comments before VIP_ENABLE. Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 Add extra menu items for different days and use vip_time (.@days * 1440). The script_commands.txt file will help you with this. Quote Link to comment Share on other sites More sharing options...
0 Noctis Posted January 13, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted January 13, 2017 2 minutes ago, Akkarin said: Add extra menu items for different days and use vip_time (.@days * 1440). The script_commands.txt file will help you with this. Thx , so that file can teach me how to work with scripts? Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted January 13, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Tuesday at 10:17 AM Share Posted January 13, 2017 25 minutes ago, Exmas said: Thx , so that file can teach me how to work with scripts? Yes - it describes each script command and how to use them. Most have examples. The top few hundred lines explains the types of NPC scripts, variables and syntax. It's supposed to be the first place anyone goes to see how to script anything. Quote Link to comment Share on other sites More sharing options...
0 diamondhole Posted May 26, 2018 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 05/03/13 Last Seen: November 17, 2020 Share Posted May 26, 2018 (edited) On 1/13/2017 at 7:48 PM, Akkarin said: prontera,100,100,5 script CashToVIP 123,{ .@cashperday = 100; mes "["+ strnpcinfo(1)+"]"; if(#CASHPOINTS == 0){ mes "You need Cash Points in order to buy VIP time"; close; } switch(vip_status(1)){ case 0: mes "You're not a VIP"; break; case 1: mes "You are a VIP"; break; } mes "You currently have "+ #CASHPOINTS +" Cash Points."; mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000"; next; mes "["+ strnpcinfo(1)+"]"; if( #CASHPOINTS < .@cashperday ){ mes "You don't have enough Cash Points to purchase VIP Days"; close; } else { mes "Would you like to purchase/increase your VIP Days?"; switch(select(" - Nope: - Yeah!")){ case 1: break; case 2: #CASHPOINTS -= .@cashperday; vip_time 1440; dispbottom "Current Cash Points: "+ #CASHPOINTS; dispbottom "VIP Expires: "+ vip_status(2); break; } close; } } it works perfectly for me, but i would to use item 7959 in exchange for VIP, can you help me on this, thank you in advance Edited May 26, 2018 by diamondhole wrongly message Quote Link to comment Share on other sites More sharing options...
-1 Noctis Posted January 13, 2017 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 226 Reputation: 13 Joined: 02/17/15 Last Seen: August 2, 2017 Author Share Posted January 13, 2017 (edited) 14 hours ago, Akkarin said: You don't even have VIP enabled.. Remove the comments before VIP_ENABLE. oh lol thought it was not like the conf files to remove that lines //, but ty i'll try it again It works thx , but it only give 1 day vip, i think is boring for you but you know/can tell me how to put it to choose between 10,20 and 30 days vip? if no its alright, ill just try a way to put it Edited January 13, 2017 by Exmas Quote Link to comment Share on other sites More sharing options...
Question
Noctis
First, yes, i searched first before, i tested all scripts of npcs who give vip for cash here in rathena and hercules, and no one works (for me), so plz, someone have a npc script who give vip days for cash plz?
Link to comment
Share on other sites
13 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.