Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. Are you using a Harmony enabled client?
  2. /* CREATE TABLE `ragnarok_logs`.`sout_market_log` ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `name` VARCHAR(30) NOT NULL DEFAULT '', `message` VARCHAR(150) NOT NULL DEFAULT '', `time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE = MyISAM DEFAULT CHARACTER SET = utf8; */ - script sout_atcommand -1,{ OnInit: bindatcmd "shout",strnpcinfo(0)+"::OnCommand"; end; OnCommand: if ( !getstrlen(.@atcmd_parameters$) ) { message strcharinfo(0), "Please, enter a message (usage: @shout <message>)."; end; } if ( @sout_delay + 1800 > gettimetick(2) ) { message strcharinfo(0), "There is a 30 min delay of using this command again"; end; } @sout_delay = gettimetick(2); .@message$ = implode( .@atcmd_parameters$," " ); announce "[Recruiting] "+ strcharinfo(0) +" : "+ .@message$, bc_area, 0x99FFFF; query_logsql( "INSERT INTO `sout_market_log` ( `name`, `message` ) VALUES ( '"+escape_sql(strcharinfo(0))+"', '"+escape_sql( getstrlen(.@message$)>150?substr(.@message$,0,149):.@message$ )+"' );" ); end; }
  3. Replace space with tab. Example: function script QWS_Dungeon_Warpra { to function script QWS_Dungeon_Warpra {
  4. Never tested the script so I didn't realize there was another menu to enable options. I've updated the script in the link to support enabling/disabling of the save function from the GM menu. You might need to refresh your browser cache to download the new script... It should be version 2.2.2
  5. Because of the way countitem2 works items that have added attributes or cards won't count... Anyways this should work but it's untested. //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6b //===== Compatible With: ===================================== //= rAthena SVN r16862+ //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //= 1.6b Added 'disable_items' command. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; } // Script Core //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; function A_An; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"#CASHPOINTS","Cash Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Headgears","Weapons","Other"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>,<required refine>{,...}); // ----------------------------------------------------------- Add(1,5022,1,0,0,7086,1,0,969,10,0,999,40,0,1003,50,0,984,2,0); Add(1,5032,1,0,0,1059,250,0,2221,1,0,2227,1,0,7063,600,0); Add(1,5027,1,0,0,2252,1,0,1036,400,0,7001,50,0,4052,1,0); Add(1,5045,1,0,0,2252,1,0,1054,450,0,943,1200,0); Add(2,1224,1,0,0,7297,30,0,969,10,0,999,50,0,714,10,0); Add(2,1225,1,0,0,7292,30,0,969,10,0,999,50,0,714,10,0); Add(3,531,1,3,0,512,1,0,713,1,0); Add(3,532,1,3,0,513,1,0,713,1,0); Add(3,533,1,3,0,514,1,0,713,1,0); Add(3,534,1,3,0,515,1,0,713,1,0); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; disable_items; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+3) mes " > "+Chk( countitem2(.@q[.@i],0,.@q[.@i+2],0,0,0,0,0),.@q[.@i+1]*.@q[1] )+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem2(.@q[.@i],0,.@q[.@i+2],0,0,0,0,0)+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshop { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1
  6. I haven't the time to test or explain but here. http://upaste.me/28e222294cb8b86d3
  7. If it has enough slots? I don't get what the requirements are for you to be able to equip the orb.
  8. Please use your head. You say my method is redundant and then tell him to use commands that function in the exact same way. For clarity, yes he is starting it with a different command and checking it in a different way but they both work on the same timer system within the source. What I was trying to explain is to use NPC TIMERS... Instead of sleep or loops. x_x And to save timestamps to variables! But yeah thanks for insulting staff. You're a fantastic Global Moderator (Keeping the peace). (If you reply to this message, Emistry, I will not answer. I'm not trying to start a war I'm just pointing out the obvious.) Thank you Annie for offering depth into your answer, and avoiding any kind of arbitrary arguments. Also thank you for finding a bug in Emistry's "Superior" method. You really are the best.
  9. All the types of timers have different unique advantages but the best in terms of utility and performance is the built in timer... If that's even what you're asking... If you just want to show the amount of time that's passed between a distinct time-frame variables are the best way of doing that. startnpctimer; //Starting the timer attached to the npc. .start = gettimetick(2); //Saving the start time to my npc variable. end; OnTimer10000: //Calling the label when 10 seconds have passed. stopnpctimer; //Destroying the timer. .end = gettimetick(2); //Saving my ending time. .difference = .end - .start; //Calculating the time that has passed. dispbottom .difference + " seconds have passed."; //Spilling the output.
  10. Assuming the above script works well. menu "Last Warp ^777777["+lastwarp$+"]^000000",-, getcharid(1)?"Party Warp ^CCCCCC["+getpartyname(getcharid(1))+"]^000000":"",Party, " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons, " ~ Guild Castles",Castles, " ~ Guild Dungeons",Guild_Dungeons, " ~ Instances",Instances, " ~ Special Areas",Special; if (lastwarp$ == "") message strcharinfo(0),"You haven't warped anywhere yet."; else warp lastwarp$,lastwarpx,lastwarpy; end; Party: deletearray .@aid[0],128; deletearray @aid[0],128; set @j,0; set @select$,""; getpartymember getcharid(1),2; set .@num,$@partymembercount; copyarray .@aid[0],$@partymemberaid[0],.@num; set .@num,getarraysize(.@aid); for(set .@i,0;.@i<.@num;set .@i,.@i+1) if(isloggedin(.@aid[.@i])) { set @aid[@j],.@aid[.@i]; set @j,@j+1; set @select$,@select$+":"+rid2name(.@aid[.@i]); } set @menu,select(@select$)-2; if(isloggedin(@aid[@menu])) { getmapxy(@m$,@x,@y,0,rid2name(@aid[@menu])); if( getmapflag(@m$,mf_pvp) || @m$ == "mapname" || @m$ == "mapname" ) { mes "You cant warp to his map now."; close; } else { warp @m$,@x,@y; } } end; P.S: Please use code brackets next time, tyvm!
  11. That's actually one of my scripts
  12. Please remember to use code bracket button next time. amatsu,196,101,5 script Donation Orb Costume Enchanter 582,{ mes "Which Costume you want to Enchant?"; mes "Make sure You have the Orb needed."; set .@menu$, callsub( MenuSub, getequipid(.Equips[1]) ) +":"+ callsub( MenuSub, getequipid(.Equips[2]) ) +":"+ callsub( MenuSub, getequipid(.Equips[3]) ) +":Cancel"; next; if( .@menu$ == ":::Cancel" ) { mes "I'm sorry but you don't have any enchant-able costumes equipped."; close; } select(.@menu$); if( @menu >= getarraysize(.Equips) ) { mes "Thank you please come again!"; close; } set .@EquipID, getequipid(.Equips[@menu]); if( !countitem(.@EquipID) || @menu <= 0 ) { mes "You don't have this Costume Equipment with you."; close; } mes "Equipment: ^FF0000"+getitemname( .@EquipID )+"^000000"; switch( select( "-Creator Orb:-Whitesmith Orb:-Sniper Orb:-Clown and Gypsy Orb:-High Wizard and Scholar Orb:-Assassin Cross Orb" )) { case 1: setarray .RuneID[0],4743; delitem 4743,1; break; case 2: setarray .RuneID[0],4744; delitem 4744,1; break; case 3: setarray .RuneID[0],4745; delitem 4745,1; break; case 4: setarray .RuneID[0],4746; delitem 4746,1; break; case 5: setarray .RuneID[0],4747; delitem 4747,1; break; default: setarray .RuneID[0],4748; delitem 4748,1; break; } for( set .@i, 0; .@i < getarraysize( .RuneID ); set .@i, .@i + 1 ) { set .@RuneMenu$, .@RuneMenu$ + getitemname (.RuneID[.@i]) +":"; } if( .@RuneMenu$ == "" ) { mes "I'm sorry but you don't have any orbs to enchant with."; close; } set .@Rune,select( .@RuneMenu$ ) - 1; mes "Rune : ^FF0000"+getitemname( .RuneID[.@Rune] )+"^000000"; next; if( select("Confirm:Cancel") == 1 ) { delitem .@EquipID,1; getitem2 .@EquipID,1,1,0,0,.RuneID[.@Rune],0,0,0; mes "Done."; mes "^0000FF"+getitemname( .EquipID[.@Equip] )+"^000000"; mes "Enchanted with ^FF0000"+getitemname( .RuneID[.@Rune] )+"^000000"; } close; MenuSub: set .@sub, .@sub+1; for( set .@i, 0; .@i < .len; set .@i, .@i + 1 ) { if( getarg(0) == .EquipID[.@i] ) return getitemname (getarg(0)) + ( !getitemslots(getarg(0)) ? "" : "["+getitemslots(getarg(0))+"]" ); } return ""; OnInit: setarray .Equips[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW; setarray .EquipID, 18508, 18543, 18579, 18580, 18595, 18529, 18631, 18637, 18639, 18693, 18577, 18647, 18649, 18657, 18664, 18690, 18712, 18737, 18743, 18747, 18546, 18627, 18644, 18643, 18665, 18670, 18677, 18683, 18698, 18746; set .len, getarraysize(.EquipID); }
  13. Fortunately for you I'm a hoarder of scripts. Minerworld By Myzter Unfortunately I never downloaded the bot killer script that or I did and deleted it not knowing what it was. I've updated the original topic.
  14. Skorm

    Apple Tree

    prontera,100,100,5 script Apple Giver 100,{ if( !.apples ) { .apples++; mes "[ ^0000FFApple Giver^000000 ]"; mes "Whoa! It must be your lucky day here are some yummy apples for you!"; getitem 501, 20; } else { mes "[ ^0000FFApple Giver^000000 ]"; mes "Look someone was already here and got all my apples..."; } close; OnClock0000: .apples = 0; }
  15. I've talked with quite a few clients about this... What I normally find is that sometimes when they say eAmod they actually are using rAmod. If that isn't the case they use eAthena for stability or familiarity. Also sometimes it's just a lack of understanding. They search for an emulator and end up finding eAmod/eAthena first and perhaps don't understand that most eAthena scripts run fine on rAthena. Convenience is also another factor where as rAthena aims for 1:1 with retail Ragnarok Online eAmod is more of a custom ready server, so most little things that you see in a private server are already done. But the biggest thing I've found people using eAmod for is the custom battleground system. If you want my opinion rAthena is better and free. Although you'll have to do more work to get things setup. In the end you'll understand more, and have better support.
  16. Lots of wishes.

  17. //===== rAthena Script ======================================= //= MVP Ladder Game //===== By: ================================================== //= aftermath, AnnieRuru (rewrite) //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Gather a party and kill every MVP in ascending order. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ prontera,147,170,3 script MvP Survival 56,{ mes "[MvP Survival Warper]"; mes "Say... do you want to play the MvP Ladder game?"; next; switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) { case 1: break; case 2: mes "[MvP Survival]"; mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest."; if ( .finish_item_amount ) mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +"."; if ( .register_cost ) mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny."; next; mes "[MvP Survival]"; mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed."; mes "Good luck!"; close; case 3: mes "[MvP Survival]"; if ( !$mvpladdderparty_time ) { mes "Nobody has finished this game yet."; close; } mes "The best record is"; mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]"; mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000."; .@size = getarraysize( $mvpladderparty_member$ ); for ( .@i = 0; .@i < .@size; .@i++ ) mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i]; if ( getgmlevel() < .gmlvlreset ) close; next; if ( select( "Close.", "Reset the record." ) == 1 ) close; if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close; $mvpladdderparty_time = 0; $mvpladdderparty_name$ = ""; deletearray $mvpladderparty_member$[.@i]; mes "[MvP Survival]"; mes "Record reset successfully."; close; case 4: mes "[MvP Survival]"; mes "When you are strong enough to complete the game, please come back."; close; } if ( !getcharid(1) ) { mes "[MvP Survival]"; mes "You have to form a party to play."; close; } if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "[MvP Survival]"; mes "Only the party leader can register."; close; } .total_name = 0; .concat_names$ = ""; .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) .@online++; if ( #ladder_delay > gettimetick(2) ) { .concat_names$ = .concat_names$ + ( .concat_names$ == "" ? "" : ", " ) + strcharinfo(0); .total_name++; } } } attachrid .@origin; if ( .concat_names$ != "" ) { mes "[MvP Survival]"; mes "Sorry but player"+ ( .total_name ? "s " : " " ) + .concat_names$ + ( .total_name ? " have" : "had" ) +" a delay to re-enter."; close; } if ( $@partymembercount != .register_min ) { mes "[MvP Survival]"; mes "You have to form a party with exactly "+ .register_min +" members to play."; close; } else if ( .@online != .register_min ) { mes "[MvP Survival]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } else if ( .register_cost && Zeny < .register_cost ) { mes "[MvP Survival]"; mes "You don't have enough zeny. Please come back when you do."; close; } else if ( .party_id ) { mes "[MvP Survival]"; mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished."; mes "Thank you."; close; } Zeny -= .register_cost; announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); .@c++; } } } cleanmap .eventmap$; warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4); donpcevent strnpcinfo(0)+"::OnMvpDead"; sleep .timeout * 60000; if ( .round == .totalround +1 ) { getpartymember .party_id, 1; getpartymember .party_id, 2; mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) { getitem .finish_item_id, .finish_item_amount; #ladder_delay = gettimetick(2) + .enter_delay; } } } set .@timeused, gettimetick(2) - .@time_enter; if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) { mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .bonus_item_id, .bonus_item_amount; } } } if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) { mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; set $mvpladdderparty_time, .@timeused; set $mvpladdderparty_name$, getpartyname( .party_id ); copyarray $mvpladderparty_member$, .@name$, .register_min; } else mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; sleep 10000; announce "The party ["+ getpartyname( .party_id ) +"] has finished the MvP ladder game!", bc_all; } else announce "The party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .party_id = .round = 0; end; OnMvpDead: .round++; if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) { for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .round_item_id, .round_item_amount; } } } if ( .round == .totalround +1 ) { awake strnpcinfo(0); end; } else if ( .round == .totalround ) mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds...", bc_map; else mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds...", bc_map; sleep .delay * 1000; if ( .mvpid[.round] == 1646 ) // pick random Bio3 MVP .mvpid[.round] = rand(1646,1651); monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead"; mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue; end; OnPCLogoutEvent: if ( hp > 0 ) .@less_one = 1; else end; OnPCDieEvent: if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end; if ( getcharid(1) != .party_id ) end; #ladder_delay = gettimetick(2) + .enter_delay; getpartymember .party_id, 1; getpartymember .party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ && hp > 0 ) .@alive++; } } if ( .@less_one ) .@alive--; if ( !.@alive ) { mapannounce .eventmap$, "Party wiped!", bc_map; sleep 10000; awake strnpcinfo(0); } end; OnInit: // Configurations ----------------------------------------------------- // delay to re-enter (in secs) set .enter_delay, 3600; // Time limit (in minutes) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 60; // entrance fee (in Zeny) set .register_cost, 100000; // exact amount of party members needed to start the game set .register_min, 2; // id of each mvp. you can add more setarray .mvpid[1], 1086,// Golden Thief Bug 64 1115,// Eddga 65 1150,// Moonlight Flower 67 1159,// Phreeoni 69 1112,// Drake 70 1492,// Incantation Samurai 71 1046,// Doppelgangger 72 1252,// Garm 73 1418,// Evil Snake Lord 73 1059,// Mistress 74 1190,// Orc Lord 74 1087,// Orc Hero 77 1251,// Knight of Windstorm 77 1038,// Osiris 78 1658,// Ygnizem 79 1272,// Dark Lord 80 1039,// Baphomet 81 1147,// Maya 81 1785,// Atroce 82 1389,// Dracula 85 1630,// Bacsojin 85 1885,// Gorynych 85 1623,// RSX 0806 86 1511,// Amon Ra 88 1688,// Lady Tanee 89 1768,// Gloom Under Night 89 1719,// Datale 90 1734,// Kiel D-01 90 1157,// Pharaoh 93 1373,// Lord of Death 94 3117,// King Poring 95 1502,// pori pori 96 1312,// Turtle General 97 1779,// Ktullanux 98 1874,// Beelzebub 98 1832;// Ifrit 99 // number of rounds (default: 39) set .totalround, getarraysize(.mvpid) -1; // item reward for completing each round set .round_item_id, 7711; set .round_item_amount, 1; // item reward for completing the entire ladder set .finish_item_id, 7711; set .finish_item_amount, 10; // bonus reward if ladder completed within a certain time (in minutes) set .bonus_time, 25; // if completed within 45 minutes, this reward is given set .bonus_item_id, 7711; set .bonus_item_amount, 10; // time delay between rounds, in seconds (default: 3) set .delay, 6; // minimum GM level to reset the best record set .gmlvlreset, 99; // event map set .eventmap$, "guild_vs2-2"; // mapflag configuration setarray .@mapflag, mf_nowarp, mf_nowarpto, mf_nosave, mf_nomemo, mf_noteleport, // mf_nopenalty, // disable exp loss mf_noreturn, // mf_nobranch, // mf_nomobloot, // disable monster drop loots, // mf_nomvploot, // 2 of these mf_partylock; // Config Ends -------------------------------------------------------------- mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map; getmapxy .map$, .x, .y, 1; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .@size = getarraysize( .@mapflag ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .eventmap$, .@mapflag[.@i]; end; }
  18. I don't think this has anything to do with scripts this might be some kind of source problem.
  19. I follow Wololo pretty hard it's not like a full ps4 hack more like being able to copy pre-existing games. Which doesn't allow homebrew and stuff. I'm more interesting in the vita scene because Sony has pretty much given up on the handheld and that's no fun.
  20. Instance already timeout if the player doesn't enter within a set amount of time they will also timeout if the player enters but doesn't move for so long.
  21. I believe there are a few of these around try searching for it. http://lmgtfy.com/?q=rathena+ip+rewards
  22. - script tran_res_cmd -1,{ OnCMD: if( eaclass() & EAJL_UPPER ) message strcharinfo(0), "Transcendent jobs are not allowed this command."; else atcommand "@command"; end; OnInit: bindatcmd "command","tran_res_cmd::OnCMD"; }
  23. Actually I was going to suggest that but you didn't give me enough of the code to work with. Next time paste full code and what emulator you're using so the problem can be resolved more effectively. Otherwise you're just wasting our time, thank you!
×
×
  • Create New...