Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Hi, I changed all acc_reg_num_db to acc_reg_num. This is the correct table name for rAthena. // --- //= Cash Point Manager v1.0 [Rokimoki] // * Add Cash Points // * Delete Cash Points // * Watch Cash Points // * Notify the player if an admin has added/deleted some cash to you. // * If the player is online it will tell which GM did. // * If the player is NOT online will show a notification when logged in but will not tell the GM who did it. // * Logs system. Must be 'log_npc: true' in conf/map/logs.con file. // -> If somebody put wrong password in whisp system. // -> If add/delete cash points. // --- //= This works if you are online or not, if online don't use SQL if offline use SQL. // --- //= v2.0 [Rokimoki] // * Recycled this old script and adapted to Hercules database // * Transtaled to English // --- - script donations -1,{ OnWhisperGlobal: .@p$ = "yourpassword"; //Leave empty ("") to disable staff password if (getgmlevel() < 90) { // If you are not admin just tell you how many cash you have. dispbottom "Your have: [" + #CASHPOINTS + "] CashPoints."; end; } // End if if (.@p$ != "" && strcmp(@whispervar0$,.@p$) != 0) { // Password system, change 'yourpassword' for any password you want message strcharinfo(0), "CashPoint Manager : Input the correct password."; logmes "User: " +strcharinfo(0) +" with account_id: " +getcharid(3) +" typed a wrong password, he wrote: " +@whispervar0$; // Just for watch if bruteforcing or something end; } // End if deletearray .@username$[0], 128; // Debug deletearray .@accid[0], 128; message strcharinfo(0), "CashPoint Manager : Welcome Staff member " + strcharinfo(0) + "!"; switch (select("Add Cash Points:Delete Cash Points:Watch Cash Points:End")) { case 1: // Add cash points callfunc("CashPoints",1); break; case 2: // Delete cash points callfunc("CashPoints",2); break; case 3: // Watch cash points callfunc("CashPoints",3); break; case 4: // Close } // End switch end; OnPCLoginEvent: // Offline notifications if (#CASHPOINTS < lastCash) dispbottom "Some administrator deleted some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; else if (#CASHPOINTS > lastCash) dispbottom "Some administrator added some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; set lastCash, #CASHPOINTS; end; OnInit: bindatcmd strnpcinfo(1),strnpcinfo(3)+"::OnWhisperGlobal"; end; } // End Script function script CashPoints { if (select("Select by character name:Select by login username") == 1) { mes "Input character name: "; next; input .@charName$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" +escape_sql(.@charName$) +"'", .@accid[0]; } else { mes "Input login username: "; next; input .@loginName$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" +escape_sql(.@loginName$) +"'", .@accid[0]; } // End if if (!.@accid[0]) { mes "Invalid information, error occurred: account or character not found."; close; } // End if if (getarg(0) == 3) { // Watch Cash Points if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player in this script attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save Cash Points amount detachrid; attachrid(.@id); mes .@npcName$; mes "This player has: [^FF0000" +.@cash +"^000000] Cash Points."; } else { // If offline query_sql "SELECT `value` FROM `acc_reg_num` WHERE `key` = '#CASHPOINTS' AND `account_id` = " +.@accid[0], .@value[0]; // Save Cash Points amount if (!.@value[0]) mes "He has [^FF00000^000000] Cash Points."; // 0 cash else mes "He has [^FF0000" +.@value[0] +"^000000] Cash Points."; // if he has cash } // End if close; } // End if mes .@npcName$; mes "Input Cash Point amount, range: 1~100"; // Change here too if you want to show proper information next; input .@amount, -1000, 1000; // Debug if (.@amount < 1 || .@amount > 100) { // Define in this if the amount you want to limit (just the right part) mes .@npcName$; mes "Invalid amount, input in the proper range told."; close; } // End if if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save current cash if (getarg(0) == 1) { // Add cash set #CASHPOINTS, #CASHPOINTS + .@amount; // Add cash dispbottom "This admin: [" + .@gm$ +"] added: " +.@amount +" cash points, current balance: [" +#CASHPOINTS + "]"; // Online notification } else if (getarg(0) == 2) { // Delete cash if (.@cash <= 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } else if (.@cash - .@amount < 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" +.@cash +"^000000] cash points."; close; } // End if set #CASHPOINTS, #CASHPOINTS - .@amount; // Delete cash dispbottom "This admin [" + .@gm$ +"] deleted: " +.@amount +" cash points, current balance: " +#CASHPOINTS; // Online notification set .@action, 1; // Cash deleted flag } // End if detachrid; attachrid(.@id); } else { // If offline query_sql "SELECT `key` FROM `acc_reg_num` WHERE `account_id` = " + .@accid[0], .@username$[0]; // check current cash if (.@username$[0] != "#CASHPOINTS") { // If empty, never had Cash Points if (getarg(0) == 1) { // add cash query_sql "INSERT INTO `acc_reg_num`(`account_id`, `key`, `index`, `value`) VALUES ('" + .@accid[0] + "','#CASHPOINTS','0','" + .@amount + "')"; // create the data } else { // delete cash mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } // End if } else { // Player had or has Cash Points if (getarg(0) == 1) { // add cash query_sql "UPDATE `acc_reg_num` SET `value` = `value` + '" +.@amount +"' WHERE `key` = '#CASHPOINTS' and `account_id` = '" +.@accid[0] +"'"; // update cash } else { // delete cash query_sql "SELECT `value` FROM `acc_reg_num` WHERE `key` = '#CASHPOINTS' and `account_id` = " +.@accid[0], .@value[0]; // check current cash mes .@npcName$; if (.@value[0] <= 0) { mes "You can not delete cash points, this player has no cash points."; close; } else if (.@value[0] - .@amount < 0) { mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" + .@value[0] + "^000000] cash points."; close; } // End if query_sql "UPDATE `acc_reg_num` SET `value` = `value` - '" + .@amount + "' WHERE `key` = '#CASHPOINTS' and `account_id` = '" + .@accid[0] + "'"; set .@action, 1; // Cash deleted flag } // End if } // End if } // End if // Saving logs if (!.@action) logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " added " + .@amount +" Cash Points to: " + .@accid[0]; else logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " removed " + .@amount +" Cash Points to: " + .@accid[0]; mes "Cash Points successfully sent, when the players log in will receive a notification, thanks for using this service."; return; } // End function
  3. i want to use this NPC i found on rathena on my server. the use of this NPC is to transfer cash points or zeny to other players prontera,45,99,2 script Transfer Angel 437,{ start: mes "[Transfer Angel]"; mes "Hello " + strcharinfo(0) + ","; mes "What can I do for you?"; next; menu "Cash Transfer",cashi,"Zeny Transfer",zenyi,"Leave",L_Leave; cashi: mes "[Transfer Angel]"; if (#CASHPOINTS==0){ mes "Sorry but you don't have any Cash Points."; next; goto start; } mes "Please enter the char's name:"; mes "(You have " + #CASHPOINTS + " Cash Points)"; input .@name$; query_sql "SELECT `account_id`,`name` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@account_id,.@name$; next; if (!.@account_id) { mes "[Transfer Angel]"; mes "^FF0000Char name does not exist.^000000"; close; } else if (.@account_id==getcharid(3)) { mes "[Transfer Angel]"; mes "Why would you send points to yourself?"; next; goto cashi; } cashsend: mes "[Transfer Angel]"; mes "How many Cash Points to send?"; mes "You'r sending to: ^0000FF"+.@name$+"^000000"; mes "(You have: " + #CASHPOINTS + " Cash Points)"; mes "(Type 0 to cancel)"; input .@amt; if (.@amt == 0) close; next; if (.@amt < 1) { mes "[Transfer Angel]"; mes "^0000FFPlease enter a positive number^000000."; next; goto cashsend; } else if (.@amt > #CASHPOINTS) { mes "[Transfer Angel]"; mes "^0000FFYou do not have that many Cash Points.^000000 The max you can send is: "+#CASHPOINTS; next; goto cashsend; } mes "[Transfer Angel]"; mes "Send "+.@amt+" Cash Points to ^0000FF"+.@name$+"^000000?"; menu "Yes",yy,"Back to Menu",nn; yy: // save their Account ID and name set .@AID, playerattached(); set .@send_name$, strcharinfo(0); // subtract their Cash Points set #CASHPOINTS, #CASHPOINTS - .@amt; // transfer the Cash Points if (attachrid(.@account_id)) { // if they are logged in set #CASHPOINTS, #CASHPOINTS + .@amt; dispbottom .@send_name$ + " sent you " + .@amt + " Cash Points! Total = " + #CASHPOINTS; } else { // if they are offline, query_sql if( query_sql("SELECT account_id FROM global_reg_value WHERE str='#CASHPOINTS' AND account_id="+.@account_id, .@account_id) ) query_sql "UPDATE global_reg_value SET `value`=`value`+"+.@amt+" WHERE str='#CASHPOINTS' AND account_id="+.@account_id; else query_sql "INSERT INTO global_reg_value (str,`value`,`type`,account_id) VALUES ('#CASHPOINTS',"+.@amt+",2,"+.@account_id+")"; } attachrid(.@AID); next; mes "[Transfer Angel]"; mes "Transfer successful!"; next; goto start; L_Leave: mes "[Transfer Angel]"; mes "Have a nice day"; close; zenyi: mes "[Transfer Angel]"; if (zeny==0){ mes "Sorry but you don't have any Zeny."; next; goto start; } mes "Please enter the char's name:"; input .@name$; query_sql "SELECT `char_id`,`account_id`,`name` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@char_id,.@account_id,.@name$; next; if (!.@account_id) { mes "[Transfer Angel]"; mes "^FF0000Char name does not exist.^000000"; close; } else if (.@char_id==getcharid(0)) { mes "[Transfer Angel]"; mes "Why would you send zeny to yourself?"; next; goto zenyi; } zenysend: mes "[Transfer Angel]"; mes "How much Zeny to send?"; mes "You'r sending to: ^0000FF"+.@name$+"^000000"; mes "(You have: "+Zeny+" Zeny)"; mes "(Type 0 to cancel)"; input .@amt; if (.@amt == 0) close; next; if (.@amt < 1) { mes "[Transfer Angel]"; mes "^0000FFPlease enter a positive number.^000000"; next; goto zenysend; } else if (.@amt > Zeny) { mes "[Transfer Angel]"; mes "^0000FFYou do not have that much zeny.^000000 The max you can send is: "+Zeny; next; goto zenysend; } mes "[Transfer Angel]"; mes "Send "+.@amt+" Zeny to ^0000FF"+.@name$+"^000000?"; menu "Yes",yy2,"Back to Menu",nn; nn: next; goto start; yy2: // save their Account ID and name set .@AID, playerattached(); set .@send_name$, strcharinfo(0); // subtract their zeny set Zeny, Zeny - .@amt; // transfer the money if (attachrid(.@account_id)) { if (getcharid(0)==.@char_id) { // if they are logged in, on the right char set Zeny, Zeny + .@amt; dispbottom .@send_name$ + " sent you " + .@amt + " zeny!"; } else { // logged in, but on wrong char query_sql "UPDATE `char` SET `zeny`=`zeny`+'"+.@amt+"' WHERE `char_id`='"+.@char_id+"'"; } } else { // if they are offline, query_sql query_sql "UPDATE `char` SET `zeny`=`zeny`+'"+.@amt+"' WHERE `char_id`='"+.@char_id+"'"; } attachrid(.@AID); next; mes "[Transfer Angel]"; mes "Transfer successful!"; next; goto start; } however this part is not working, when i send it to an offline player there is no "global_reg_value" in my sql table, instead i have "acc_reg_num" that stores the Cashpoint of each account here is how the "acc_reg_num table looks like so,which part do i need to modify? thanks in advance for helping
  4. Flux CP Addons, Crypto Payments Gateway Initial Release Download here
  5. Please forgive me, I really like this aura and I can’t find it anywhere. Maybe there is someone who has this aura and can share it?
  6. I found this on herc, but it seems like it doenst work on rathena can someone give a working version of this script?? this is the original script i got from herc // --- //= Cash Point Manager v1.0 [Rokimoki] // * Add Cash Points // * Delete Cash Points // * Watch Cash Points // * Notify the player if an admin has added/deleted some cash to you. // * If the player is online it will tell which GM did. // * If the player is NOT online will show a notification when logged in but will not tell the GM who did it. // * Logs system. Must be 'log_npc: true' in conf/map/logs.con file. // -> If somebody put wrong password in whisp system. // -> If add/delete cash points. // --- //= This works if you are online or not, if online don't use SQL if offline use SQL. // --- //= v2.0 [Rokimoki] // * Recycled this old script and adapted to Hercules database // * Transtaled to English // --- - script donations -1,{ OnWhisperGlobal: if (getgmlevel() < 90) { // If you are not admin just tell you how many cash you have. dispbottom "Your have: [" + #CASHPOINTS + "] CashPoints."; end; } // End if if (strcmp(@whispervar0$,"yourpassword") != 0) { // Password system, change 'yourpassword' for any password you want logmes "User: " +strcharinfo(0) +" with account_id: " +getcharid(3) +" typed a wrong password, he wrote: " +@whispervar0$; // Just for watch if bruteforcing or something end; } // End if deletearray .@username$[0], 128; // Debug deletearray .@accid[0], 128; set .@npcName$, "[^0000FFCashPoint Manager^000000]"; mes .@npcName$; mes "Hi, I am your assistant, tell me what you need please..."; next; switch (select("Add Cash Points:Delete Cash Points:Watch Cash Points:End")) { case 1: // Add cash points callfunc("CashPoints",1); break; case 2: // Delete cash points callfunc("CashPoints",2); break; case 3: // Watch cash points callfunc("CashPoints",3); break; case 4: // Close mes "Good bye..."; break; } // End switch close; OnPCLoginEvent: // Offline notifications if (#CASHPOINTS < lastCash) dispbottom "Some administrator deleted some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; else if (#CASHPOINTS > lastCash) dispbottom "Some administrator added some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; set lastCash, #CASHPOINTS; end; } // End Script function script CashPoints { mes .@npcName$; mes "I need to ask you something..."; next; mes .@npcName$; if (select("Select by character name:Select by login username") == 1) { mes "Input character name: "; next; input .@charName$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" +escape_sql(.@charName$) +"'", .@accid[0]; } else { mes "Input login username: "; next; input .@loginName$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" +escape_sql(.@loginName$) +"'", .@accid[0]; } // End if if (!.@accid[0]) { mes "Invalid information, error occurred: account or character not found."; close; } // End if if (getarg(0) == 3) { // Watch Cash Points if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player in this script attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save Cash Points amount detachrid; attachrid(.@id); mes .@npcName$; mes "This player has: [^FF0000" +.@cash +"^000000] Cash Points."; } else { // If offline query_sql "SELECT `value` FROM `acc_reg_num_db` WHERE `key` = '#CASHPOINTS' AND `account_id` = " +.@accid[0], .@value[0]; // Save Cash Points amount if (!.@value[0]) mes "He has [^FF00000^000000] Cash Points."; // 0 cash else mes "He has [^FF0000" +.@value[0] +"^000000] Cash Points."; // if he has cash } // End if close; } // End if mes .@npcName$; mes "Input Cash Point amount, range: 1~100"; // Change here too if you want to show proper information next; input .@amount, -1000, 1000; // Debug if (.@amount < 1 || .@amount > 100) { // Define in this if the amount you want to limit (just the right part) mes .@npcName$; mes "Invalid amount, input in the proper range told."; close; } // End if if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save current cash if (getarg(0) == 1) { // Add cash set #CASHPOINTS, #CASHPOINTS + .@amount; // Add cash dispbottom "This admin: [" + .@gm$ +"] added: " +.@amount +" cash points, current balance: [" +#CASHPOINTS + "]"; // Online notification } else if (getarg(0) == 2) { // Delete cash if (.@cash <= 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } else if (.@cash - .@amount < 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" +.@cash +"^000000] cash points."; close; } // End if set #CASHPOINTS, #CASHPOINTS - .@amount; // Delete cash dispbottom "This admin [" + .@gm$ +"] deleted: " +.@amount +" cash points, current balance: " +#CASHPOINTS; // Online notification set .@action, 1; // Cash deleted flag } // End if detachrid; attachrid(.@id); } else { // If offline query_sql "SELECT `key` FROM `acc_reg_num_db` WHERE `account_id` = " + .@accid[0], .@username$[0]; // check current cash if (.@username$[0] != "#CASHPOINTS") { // If empty, never had Cash Points if (getarg(0) == 1) { // add cash query_sql "INSERT INTO `acc_reg_num_db`(`account_id`, `key`, `index`, `value`) VALUES ('" + .@accid[0] + "','#CASHPOINTS','0','" + .@amount + "')"; // create the data } else { // delete cash mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } // End if } else { // Player had or has Cash Points if (getarg(0) == 1) { // add cash query_sql "UPDATE `acc_reg_num_db` SET `value` = `value` + '" +.@amount +"' WHERE `key` = '#CASHPOINTS' and `account_id` = '" +.@accid[0] +"'"; // update cash } else { // delete cash query_sql "SELECT `value` FROM `acc_reg_num_db` WHERE `key` = '#CASHPOINTS' and `account_id` = " +.@accid[0], .@value[0]; // check current cash mes .@npcName$; if (.@value[0] <= 0) { mes "You can not delete cash points, this player has no cash points."; close; } else if (.@value[0] - .@amount < 0) { mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" + .@value[0] + "^000000] cash points."; close; } // End if query_sql "UPDATE `acc_reg_num_db` SET `value` = `value` - '" + .@amount + "' WHERE `key` = '#CASHPOINTS' and `account_id` = '" + .@accid[0] + "'"; set .@action, 1; // Cash deleted flag } // End if } // End if } // End if // Saving logs if (!.@action) logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " added " + .@amount +" Cash Points to: " + .@accid[0]; else logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " removed " + .@amount +" Cash Points to: " + .@accid[0]; mes "Cash Points successfully sent, when the players log in will receive a notification, thanks for using this service."; return; } // End function Thanks in advance!
  7. Hi I try to add it manual but is having only 1 error. Clif_Sellitem doesn't seem to be working as per the screenshot shows. How to solve this?
  8. Upload your dmg sprite number here
  9. I already added it xD Both OG Setup and OpenSetup I use it on my local folder, I don't know If I should ship it on the ro-folder too, tho, as it can cause problems with some graphic cards, mostly AMDs
  10. if(countitem(40024) < 1 || countitem(40031) < 1 || countitem(40027) < 1){
  11. Yesterday
  12. Hello, I'm going to describe what I'd like to accomplish. I have a party with 2 users, player1 enables a command that will display a hateffect on himself, and on the party members as well. Player 2, has disabled that command, so he won't see any hateffect, neither on him or the other party members. Once player2 enables the command, he will see the hateffect on him and his party members. I've tried with the function clif_hat_effect_single and different target type, but none of them seems to fit my previous requirements. That's why i was thinking about create a custom target type, however I don't quite understand that logic with these: WFIFOHEAD( fd, len ); memcpy( WFIFOP( fd, 0 ), buf, len ); WFIFOSET( tsd->fd, len ); So, after several hours trying, I'd like to ask for some help on this.. Thank you for your time!
  13. if(countitem(40024) < 1 && countitem(40031) < 1 && countitem(40027) < 1){
  14. as title, i have all 3 items in my inventory but somehow the script did not detect my item and keep saying i dont have enough..?
  15. like this one sir? if (getrefine()==2) { bonus2 bAddClass,Class_All,1; } else if(getrefine()==4) { bonus2 bAddClass,Class_All,2; } else if(getrefine()==6) { bonus2 bAddClass,Class_All,3; } else if(getrefine()==8) { bonus2 bAddClass,Class_All,4; } else if(getrefine()==10) { bonus2 bAddClass,Class_All,5; }
  16. then use if, for example if (getrefine()==8) { bonus bCastrate,-20; bonus bDelayRate,-20; } or anything needed.
  17. how about this in +1 no add +2 add +2 in bAtk then +3 no add and +4 will add again 2 in bAtk so it will be +4 bAtk
  18. bonus bAtkRate,n; ATK + n% that won't interfere with Damage modifier and SC_EDP (renewal mode only) So ... .@r = getrefine()/2; bonus bAtkRate,.@r;
  19. can someone do this to put in item_db Each two refine upgrades = increases your ATK by 1%
  20. Sure, the font is alot smaller than normal fonts (pixel height and width) but the space is the same no matter what
  21. try with this https://github.com/rathena/rathena/blob/26335994588c4b45846c05d0e53780ead78e475c/conf/battle/feature.conf#L166
  22. You're absolutely right. I just started going through the various vilnerabilities in my latest guides. Thanks for pointing this out! I have updated the guide to include a quick method to disallow anyone but the host(s) to have access to PMA.
  23. Its only here for showcase until I am satisfied with it.
  1. Load more activity
×
×
  • Create New...