Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/09/22 in Posts

  1. conf\log_athena.conf // Enable Logs? (Note 3) ... ... // 0x00000010 - (S) Log NPC transactions (buy/sell) ... ... enable_logs: 0x00000010 load the NPC prontera,155,181,5 script Sample 757,{ .@sql$ = "SELECT `nameid`, SUM(`amount`) AS `total` FROM `picklog` WHERE `type` = 'S' AND `amount` > 0 GROUP BY `nameid` ORDER BY `total` DESC LIMIT 10"; .@count = query_sql(.@sql$, .@nameid, .@total); mes "Items:"; for (.@i = 0; .@i < .@count; .@i++) mes getitemname(.@nameid[.@i])+" - "+F_InsertComma(.@total[.@i]); close; } however there is no way telling how much NPC have earned or lost from the transaction since it's not log.
    1 point
  2. //===== rAthena Script ======================================= //= Reset NPC //===== By: ================================================== //= rAthena Dev Team //===== Current Version: ===================================== //= 1.06 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Resets skills, stats, or both. //= https://rathena.org/board/topic/102190-stat-reset-with-dynamic-price/ //===== Additional Comments: ================================= //= 1.00 First Version //= 1.01 Optimized for the greater good. [Kisuka] //= 1.02 Cleaning [Euphy] //= 1.03 All statuses removed upon skill reset. [Euphy] //= 1.04 Compressed Script [Stolao] //= 1.05 Added limit use option [Stolao] //= 1.06 Added Dynamic Pricing For Bisuke on Rathena [Stolao] //============================================================ prontera,150,193,4 script Reset Girl 124,{ // Skills, Stats, Both, Limit if(BaseLevel > 85){ set .@Reset, 100000, 100000, 90000, 0; else if(BaseLevel > 75){ set .@Reset, 75000, 75000, 70000, 0; else if(BaseLevel > 45){ set .@Reset, 50000, 50000, 50000, 0; else { set .@Reset, 10000, 10000, 9000, 0; } mes "[Reset Girl]"; if(.@Reset[3] && reset_limit > .@Reset[3]) { mes "Sorry you can only reset "+.@Reset[3]+" time in your life."; close; } mes "I am the Reset Girl."; mes "Reset Stats: "+ callfunc("F_InsertComma",.@Reset[1]) +"z"; mes "Reset Skills: "+ callfunc("F_InsertComma",.@Reset[0]) +"z"; mes "Reset Both: "+ callfunc("F_InsertComma",.@Reset[2]) +"z"; mes "Please select the service you want:"; next; set .@i,(select("^FF3355Reset Skills:Reset Stats:Reset Both^000000:Cancel")); if(.@i > 3) close; mes "[Reset Girl]"; if (Zeny < .@Reset[.@i-1]) { mes "Sorry, you don't have enough Zeny."; close; } if(.@Reset[3]){ mes "You can only reset "+.@Reset[3]+" time in your life, are you sure?"; if(select("Let me think:Thats fine") == 1) close; } set Zeny, Zeny-.@Reset[.@i-1]; if(.@i&1){ sc_end SC_ALL; ResetSkill; } if(.@i&2) ResetStatus; mes "There you go!"; if(.@Reset[3]) set reset_limit,reset_limit + 1; close; } here you are although an easier option would be to make it x cost per level eg: set .@Reset, BaseLevel * BaseLevel * 10, JobLevel * JobLevel * 15, BaseLevel * JobLevel * 9, 0;
    1 point
  3. - script asdjkasdj -1,{ end; OnInit: bindatcmd "item", strnpcinfo(0)+"::Onaaa"; end; Onaaa: if ( .@atcmd_parameters$[0] == "lalala" ) atcommand "@item "+ .@atcmd_parameters$[1] +" "+ .@atcmd_parameters$[2]; else message strcharinfo(0), "Wrong password"; end; } @item lalala 501 1
    1 point
  4. Try this one : - shop dynamicshop -1,501:20000 prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.currency) < .items[.@j+1] ) dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item."; else { delitem .currency, .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, 7227; // TCG is used to buy items setarray .items, 4001,5,7227,100; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.items[.@i],.items[.@i+1]; end; } Configuration : setarray .items, 4001,5,7227,100; // Usage : <item id>,<price> set .currency, 7227; // TCG is used to buy items
    1 point
  5. or (stolen from http://rathena.org/board/topic/77031-armor-enchanter-npc/#entry170869 ) 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; }
    1 point
  6. try this http://upaste.me/r/9b49f9
    1 point
  7. https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/merchants/enchan_arm.txt hmm ? or I make another one just for fun prontera,156,178,5 script ldfhsdfkljs 100,{ mes "do you want to enchant your equipped armor ?"; next; if ( select ( "yes", "no" ) == 2 ) close; if ( !getequipisequiped( EQI_ARMOR ) ) { mes "you did not equip an armor at the moment"; close; } .@id = getequipid( EQI_ARMOR ); .@ref = getequiprefinerycnt( EQI_ARMOR ); .@card1 = getequipcardid( EQI_ARMOR, 0 ); .@card2 = getequipcardid( EQI_ARMOR, 1 ); .@card3 = getequipcardid( EQI_ARMOR, 2 ); .@card4 = getequipcardid( EQI_ARMOR, 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,30,25,20,15,10; // rate of getting +1 is 55%, +2 is 50% .... +10 is 10% ... while ( .@i < 10 ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; }
    1 point
×
×
  • Create New...