Jump to content

Skorm

Forum Moderator
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Skorm

  1. The fact that you have to come to the rAthena board to ask this question simple because eathena.ws is no more should be a sufficient answer.
  2. Title says it all. It's been a good one and hopes to many more.
  3. Just adding to @Nitrous's answer here... - script Mob Death -1,{ OnPCDieEvent: if( killerrid > 100000000 ) { getunitdata( killerrid, .@killerrid ); if( getarraysize(.@killerrid) == 49 ) dispbottom "You were killed by "+getmonsterinfo( .@killerrid[13], MOB_NAME )+"."; } }
  4. @Tokei Yeah I'm completely aware of that xD. I also understand where you're coming from before. Which is why in most of the scripts I answer I say "Ok, here is one way of doing it." It might not be optimal but a lot of the time information is omitted from the request. If the person requesting the script said they wanted to duplicate this npc 500 times I wouldn't do what I've done here, but we're not being paid and if the specifics aren't there I'm going to take the quicker route. Thank you for being so understanding.
  5. Why not just use npc variables? If the other npcs are duplicates of a single npc they can all share a single npc array. Then just shuffle the array as you go... You can never shuffle a deck enough. prontera,151,183,0 script NPC#0 77,{ .@id = atoi(strnpcinfo(2)); dispbottom "Variable " + (.@id + 1) + ": " + .npc_variables[.@id]; end; OnInit: .@len = getarraysize(.npc_variables); .npc_variables[.@len] = atoi(strnpcinfo(2))+1; for ( .@i = 0; .@i < .@len + 1; .@i++ ){ .@n = ( rand(gettimetick(0)) % ( .@i + 1 ) ); .@temp = .npc_variables[.@i]; .npc_variables[.@i] = .npc_variables[.@n]; .npc_variables[.@n] = .@temp; } } prontera,153,183,0 duplicate(NPC#0) NPC#1 77 prontera,155,183,0 duplicate(NPC#0) NPC#2 77 prontera,157,183,0 duplicate(NPC#0) NPC#3 77
  6. prontera,184,177,5 script Guild Buffer 100,{ setarray .@sc_effect, SC_INCREASEAGI, SC_BLESSING, SC_ANGELUS; setarray .@skil_txt$, "Increase Agility", "Blessing", "Angelus"; setarray .@ticks , 200000, 200000, 200000; setarray .@skil_num , 29, 34, 33; setarray .@levels , 10, 10, 10; .@len = getarraysize(.@sc_effect); if( !strcmp( strcharinfo(2), "Emperor" ) ) { for( .@a = 0; .@a < .@len; .@a++ ) { misceffect 253; skilleffect .@skil_num[.@a], .@levels[.@a]; sc_start .@sc_effect[.@a], .@ticks[.@a], .@levels[.@a]; message strcharinfo(0),"Buff ["+.@skil_txt$[.@a]+"] Added."; } } end; } If you mean one person clicks the buffer and entire guild gets buffed... I limited it to just the guild master and only once per minute...
  7. Did you update your map-cache?
  8. Everything you need to know is on the wiki please read it thoroughly. https://github.com/rathena/rathena/wiki/Custom_Items
  9. ordeal_2-1.gat mapflag noskill Use tabs instead of spaces in npc headers. Please go through and read the top portion of this file thoroughly https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L132
  10. Exchanger [ Cashpoint to Coins ] Exchanger [ Poring Coin - Zeny ] Exchanger [ Points to Tickets ] Exchanger [ Item to Item ] Exchanger [ Item to Item ] Exchanger [ Multi Item to 1 Item ] So it's not any of those? If it's something directly from the SQL database I might have to make that. I think there are some floating around but I can't find them right away. Edit: So here's the converter that I couldn't find. I just made one it's untested and I'm not 100% sure what CP it works with but I think it's Flux. prontera,184,177,5 script Credit Trader 851,{ .@zeny_worth = 1000000; query_sql ( "SELECT `balance` FROM `cp_credits` WHERE `account_id` = "+getcharid(3)+";", .@credits ); mes "What would you like to do?"; next; .@select = select("Credits -> Zeny?:Zeny -> Credits?") -1; mes "How "+( .@select ? "much zeny" : "many credits" )+" would you like to convert?"; mes .@select ? "Zeny: ^0000FF"+Zeny+"^000000" : "Credits: ^0000FF"+.@credits+"^000000"; next; if( input( .@withdraw, 1, .@select ? Zeny : .@credits ) != 0 ) { mes "Please input a number between 1 and ^0000FF"+(.@select ? Zeny : .@credits)+"^000000."; close; } if( .@select && .@withdraw < .@zeny_worth ) { mes "Each credit costs at least ^0000FF"+.@zeny_worth+"^000000 Zeny."; close; } mes "Are you sure?"; mes .@select ? "^0000FF"+.@withdraw+"^000000 Zeny -> ^00FF00"+( .@withdraw / .@zeny_worth )+"^000000 Credits."; : "^0000FF"+.@withdraw+"^000000 Credits -> ^00FF00"+( .@withdraw * .@zeny_worth )+"^000000 Zeny."; next; if( select("Yes:No") == 2 ) { mes "Alright come again!"; close; } Zeny = .@select ? ( ( Zeny - .@withdraw ) + ( .@withdraw % .@zeny_worth ) ) : Zeny + ( .@withdraw * .@zeny_worth ); query_sql ( "UPDATE `cp_credits` SET `balance` = "+( .@select ? .@credits + ( .@withdraw / .@zeny_worth ) : .@credits - .@withdraw )+" WHERE `account_id` = "+getcharid(3)+";" ); mes "Thanks for using our service have a nice day."; close; }
  11. What kind of credit... Donation credits or kafra credits?
  12. MVP ROOMS GOLD ROOMS These questions have been asked hundreds of times over.
  13. Thank you @Tokei just got out of the shower and hadn't realized my mistake.
  14. There are many ways to do something like this here's one. - script Event_Spawn -1,{ // The NPC. OnEvent: // The event label. atcommand "@doom"; // The atcommand. sleep 1000 * 60 * 60 * 6; // The timer. OnInit: // The start of the server. setarray .@maps$, "prontera", "geffen", "izlude"; // An array of maps. .@map$ = .@maps$[rand(getarraysize(.@maps$))]; // Shuffle maps. (Thanks Tokei) monster .@maps$,0,0,"--ja--",1115,1,"Event_Spawn::OnEvent"; // The monster. } // The curly.
  15. Damn you beat me to it... Fantastic song though.
  16. Comment out the old Eddge spawn in npc/pre-re/mobs/fields/payon.txt Like: //pay_fild11,0,0,0,0 boss_monster Eddga 1115,1,7200000,600000,1 And add this npc. - script Eddga_Spawn_PVP -1,{ OnOffPVP: removemapflag "pay_fild11",mf_pvp; sleep rand(600000,7200000); OnInit: setmapflag "pay_fild11",mf_pvp; monster "pay_fild11",0,0,"Eddga",1115,1,"Eddga_Spawn_PVP::OnOffPVP"; }
  17. Go into your database and find out what type weapons are. Replace 5 with your weapon type. My weapons are type 5 so it's 5 for me... [ Edit: The example here actually makes +11 refine give +9 ticket but it's different in the script above. ] I was actually unaware of that and updated the previous script. I hope you can understand how it works so you can modify it further if need be. That was intentional.
  18. Already completely aware of this. The chance of the script failing is extremely small so I thought whatever.
  19. That are a bunch of ways to do this but here's one. prontera,190,181,5 script Online Guild 45,2,2,{ end; OnTouch: .pre_cnt = 0; .party = getcharid(1); if( !.party ) end; getpartymember .party; .party_cnt = $@partymembercount; addrid( 4, 0, 190-2, 181+2, 190+2, 181-2 ); if( .party == getcharid(1) ) { .pre_cnt++; if( .pre_cnt == .party_cnt ) warpparty "geffen",192,178,.party; } end; }
  20. It is but it's a little weird because to my knowledge items in Ragnarok don't have unique ids that are easily accessed through scripts. So for example if you have two items that are exactly the same and one is equipped and the other isn't the script may delete the equipped one and not the one in your inventory. In any case here is version two. It's been slightly tested just let me know if you have any problems. //Skorm 12-10-2016 v2.1 //Uses items from the inventory/equip instead of just equip. prontera,184,177,5 script Ticket Trader 851,{ mes "[^FF0000Ticket Trader^000000]"; mes "I trade weapons and armours with specific refines for ^0000FFRefine Tickets^000000."; next; mes "[^FF0000Ticket Trader^000000]"; mes "Which equipment would you like me to convert into a ^0000FFRefine Ticket^000000?"; getinventorylist; .@inv_len = @inventorylist_count; copyarray .@inv_list_id[0], @inventorylist_id[0], .@inv_len; copyarray .@inv_list_amt[0], @inventorylist_amount[0], .@inv_len; copyarray .@inv_list_equ[0], @inventorylist_equip[0], .@inv_len; copyarray .@inv_list_ref[0], @inventorylist_refine[0], .@inv_len; copyarray .@inv_list_atr[0], @inventorylist_attribute[0], .@inv_len; copyarray .@inv_list_cd1[0], @inventorylist_card1[0], .@inv_len; copyarray .@inv_list_cd2[0], @inventorylist_card2[0], .@inv_len; copyarray .@inv_list_cd3[0], @inventorylist_card3[0], .@inv_len; copyarray .@inv_list_cd4[0], @inventorylist_card4[0], .@inv_len; for( .@a = 0; .@a < .@inv_len; .@a++ ) { if( .@inv_list_id[.@a] && compare(.allow_list$,","+.@inv_list_id[.@a]+",") ) set .@menu$, .@menu$+"^0000FF"+getitemname(.@inv_list_id[.@a])+(.@inv_list_ref[.@a]?" +"+.@inv_list_ref[.@a]:"")+"^000000:"; else { set .@menu$, .@menu$+":"; .@len++; } } next; if( countstr(.@menu$, ":") >= getstrlen(.@menu$) ) { mes "[^FF0000Ticket Trader^000000]"; mes "It doesn't look like anything you have equipped can be converted sorry."; close; } select(.@menu$); set .@eq_loc, @menu-1; set .@eq_itm, .@inv_list_id[.@eq_loc]; set .@eg_rfn, .@inv_list_ref[.@eq_loc]; if( .@eq_itm < 0 ) { mes "[^FF0000Ticket Trader^000000]"; mes "Hmm, I don't think you have anything equipped there."; close; } .@ticket = getiteminfo(.@eq_itm,2) == 5 ? .weap_t_list[.@eg_rfn] : .armo_t_list[.@eg_rfn]; if( .@eg_rfn < .uprange || .@eg_rfn > .uprange[1] ) { mes "[^FF0000Ticket Trader^000000]"; mes "Sorry but I only convert items refined between +"+.uprange+" and +"+.uprange[1]+"."; close; } else if( !.@ticket ) { mes "[^FF0000Ticket Trader^000000]"; mes "I don't seem to have a ticket for +"+.@eg_rfn+" refine."; close; } mes "[^FF0000Ticket Trader^000000]"; mes "^800000"+getitemname(.@eq_itm)+" will be changed into ^0000FF"+getitemname(.@ticket)+"^000000."; mes "Are you sure?"; next; if( select("No:Yes") == 1 ) { mes "[^FF0000Ticket Trader^000000]"; mes "Oh!- Well that was a close one then."; close; } delitem2 .@eq_itm, .@inv_list_amt[.@eq_loc], 1, .@eg_rfn, .@inv_list_atr[.@eq_loc], .@inv_list_cd1[.@eq_loc], .@inv_list_cd2[.@eq_loc], .@inv_list_cd3[.@eq_loc], .@inv_list_cd4[.@eq_loc]; getitem(.@ticket,1); mes "[^FF0000Ticket Trader^000000]"; mes "Have a nice day!"; close; OnInit: setarray .uprange, 7, 12; setarray .armo_t_list[.uprange],6235,6234,6233,6232, 0,6239; setarray .weap_t_list[.uprange],6231,6230,6229,6228, 0,6238; .allow_list$ = ",1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,2302,2304,2306,2308,2310,2311,2313,2315,2317,2318,2319,"; } http://upaste.me/dce036854abee169c
  21. Ok so they only need to re-log that would make sense. I feel like I've tested these things before but I just keep forgetting.
  22. Kinda but it's dodgy because the SQL server has to be updated and I think it would require a server restart. I do believe there is a mod that allows mail to be sent from script floating around somewhere not sure if it works for the current revision of rAthena though.
×
×
  • Create New...