Jump to content

Heartfelt

Members
  • Posts

    31
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Indonesia
  • Server
    Indonesia

Recent Profile Visitors

823 profile views

Heartfelt's Achievements

Marin

Marin (5/15)

  • Collaborator
  • First Post
  • Conversation Starter
  • Dedicated
  • Week One Done

Recent Badges

0

Reputation

  1. 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
  2. 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!
  3. is there any way to fix this error sir? @crazyarashi
  4. i just installed grf editor on my laptop. this one i used on my Desktop and completely works fine but on my laptop an error message pop up everytime i launch the app after i close the error message pop up the grf editor runs anyone knows why? and how to fix this issue? thx
  5. prontera,156,178,5 script ldfhsdfkljs 100,{ mes "do you want to enchant your equipment ?"; next; .@s = select( .menu$ ) -1; if ( !getequipisequiped( .const_equip[.@s] ) || .const_equip[.@s] == EQI_HAND_L && getiteminfo( getequipid( EQI_HAND_L ),2 ) != 5 ) { mes "you did not equip an "+ .menu_name$[.@s] +" at the moment"; close; } .@id = getequipid( .const_equip[.@s] ); .@ref = getequiprefinerycnt( .const_equip[.@s] ); .@card1 = getequipcardid( .const_equip[.@s], 0 ); .@card2 = getequipcardid( .const_equip[.@s], 1 ); .@card3 = getequipcardid( .const_equip[.@s], 2 ); .@card4 = getequipcardid( .const_equip[.@s], 3 ); if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment"; close; } if ( .@card4 ) { mes "this armor has already enchanted"; close; } .@rand = rand(.totalchance); while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; .@o = rand(0,5); // orb of str/int/dex .... delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 0; getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r; equip .@id; close; OnInit: setarray .rate, 55,50,45,40,35; // rate of getting +1 is 55%, +2 is 50% .... +10 is 10% ... setarray .const_equip, EQI_ARMOR, EQI_HAND_L, EQI_GARMENT, EQI_SHOES; setarray .menu_name$, "Armor", "Shield", "Garment", "Shoes"; .menu$ = implode( .menu_name$,":" ); while ( .@i < 10 ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; } as the title says, i want to make this script only for enchanting upper costume headgear also i want to make it only maximum to +3 Attribute thanks
  6. the thing is, the total aspd gained with this stats 153 AGI and 127 Dex is not accurate. any idea on why?
  7. why does icepick {1} doesn't work with modifier card such as strouf card / hydra card? my server is pre-renewal. does anyone have any kind of formula or calculator for this? thanks
  8. yes its pre renewal sir, i use gm account to match the status only, thats why its more than 100
  9. i found a little bug here Im using Sniper job 99 70 level it seems like this status doesn't give the correct number of ASPD with 153 AGI and 127 Dex it should be 187 ASPD i dont use any other aspd % bonus eqiupment, this is pure from agi and dex stat only it appears that the flee is not accurate as well, it should be 254 any idea? thanks
  10. hello everyone i have a costume in my ragnarok server using this item script, to make wearer apprearance become 3rd job if(roclass(eaclass()|EAJL_UPPER)) changebase BaseJob; but it does not work for ninja and gunslinger how can i make it work for ninja to look like kagerou / oboro? and gunslinger to look like rebellion ? Thanks in advance
  11. can somebody help me explain what caused this error? THANKS
  12. is it possible to give 1 second delay on /sit usage? and is it possible to give delay to /sit after using a skill? thanks
  13. As the title says. how can i use SCF_NO_SAVE to make a certain skill status gone when logged out? Thanks
  14. i need a script that makes someone that use weapon (anykind of weapon) and armor (any kind of armor) will be teleported to save point instantly when he/she try to go to izlude city thank you
  15. i need a script that will announce it when a player gets a card from a monster but i cant use the conf because my drop card is 0,5 % so i just want to make it specific to cards only
×
×
  • Create New...