Jump to content

Skorm

Forum Moderator
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Skorm

  1. 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; }
  2. 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.
  3. Lots of wishes.

  4. //===== 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; }
  5. I don't think this has anything to do with scripts this might be some kind of source problem.
  6. 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.
  7. 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.
  8. I believe there are a few of these around try searching for it. http://lmgtfy.com/?q=rathena+ip+rewards
  9. - 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"; }
  10. 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!
  11. I believe query_sql is returning -1 if nothing was found. I'm not sure if this was changed in the default rAthena or just some other server I've encountered it before, but personally I think it's dumb. Anyways... if ( query_sql( "SELECT `name` FROM `char` WHERE `name` = '"+escape_sql(.@new$)+"'", .@name$ ) <= 0 ) {
  12. Sorry I didn't get back to you sooner but that command is pretty much a replica of addrid... Except for the BG ability I think. So kinda pointless. x_x
  13. - script leveling_control -1,{ OnNPCKillEvent: .@range = BaseLevel - getmonsterinfo( killedrid, MOB_LV ); .@range = .@range < 0 ? -.@range : .@range; if ( .@range < 10 ) { .@base = getmonsterinfo( killedrid, MOB_BASEEXP ); .@job = getmonsterinfo( killedrid, MOB_JOBEXP ); if ( .@base > 0 ) set BaseExp, BaseExp + .@base * 35 / 100; if ( .@job > 0 ) set JobExp , JobExp + .@job * 35 / 100; } end; }
  14. Yes...xD https://soundcloud.com/kore-wa-hentai/senpai-ver-hentai-dude-content-entry
  15. You can't use decimal in scripts... Instead you could do... BaseExp += ( BaseExp * 35 ) / 100; Which is roughly the same thing. Also for the record... BaseExp = BaseExp + BaseExp*0.35; And BaseExp = BaseExp * 1.35; Are the same. You could even shorten it to... BaseExp *= 1.35; In some languages.
  16. Try replacing ... if (src->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); } With: if (src->type == BL_PC) { if (target->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } else { sprintf(str, "Target healed for %dhp!", hp); clif_displaymessage(sd->fd, str); } } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); }
  17. I actually tested to see if that would happen... and it didn't on my server but try this... Replace: sprintf(str, "You've healed %d!", hp); clif_displaymessage (sd->fd, str); sprintf(str, "You've been healed %d!", hp); clif_displaymessage (tsd->fd, str); With: if (src->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); } And change... char str[32]; To char str[255];
  18. This has already been done... Think I either updated another script or made my own I can't really remember but I know it's somewhere on the forums try searching for it.
  19. Why not just time how long it takes for the npc to travel one square... (.@distance * .@time_per_square_in_miliseconds); Well if the movement speed is like iRO it's 0.15s per-square at the normal walk speed. .@sleep = (.@distance * 150);
  20. There's probably a better way to do this but until someone does it... In skill.c after int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) { int skill, hp = 0; struct map_session_data *sd = BL_CAST(BL_PC, src); struct map_session_data *tsd = BL_CAST(BL_PC, target); struct status_change *sc, *tsc; Add char str[255]; Then before return hp; } Add if (src->type == BL_PC) { if (target->type == BL_PC) { sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp); clif_displaymessage(sd->fd, str); } else { sprintf(str, "Target healed for %dhp!", hp); clif_displaymessage(sd->fd, str); } } if (target->type == BL_PC && target->id != src->id) { sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name); clif_displaymessage(tsd->fd, str); }
  21. *viewpoint <action>,<x>,<y>,<point number>,<color>; This command will mark places on the mini map in the client connected to the invoking character. It uses the normal X and Y coordinates from the main map. The colors of the marks are defined using a hexadecimal number, same as the ones used to color text in 'mes' output, but are written as hexadecimal numbers in C. (They look like 0x<six numbers>.) Action is what you want to do with a point, 1 will set it, while 2 will clear it. 0 will also set it, but automatically removes the point after 15 seconds. Point number is the number of the point - you can have several. If more than one point is drawn at the same coordinates, they will cycle, which can be used to create flashing marks. // This command will show a mark at coordinates X 30 Y 40, is mark number 1, // and will be red. viewpoint 1,30,40,1,0xFF0000; This will create three points: viewpoint 1,30,40,1,0xFF0000; viewpoint 1,35,45,2,0xFF0000; viewpoint 1,40,50,3,0xFF0000; And this is how you remove them: viewpoint 2,30,40,1,0xFF0000; viewpoint 2,35,45,2,0xFF0000; viewpoint 2,40,50,3,0xFF0000; The client determines what it does with the points entirely, the server keeps no memory of where the points are set whatsoever. Is one way if a player is connected... But you're probably looking for... *questinfo <Quest ID>, <Icon> {, <Map Mark Color>{, <Job Class>}}; This is esentially a combination of checkquest and showevent. Use this only in an OnInit label. For the Quest ID, specify the quest ID that you want checked if it has been started yet. For Icon, use one of the following: No Icon : QTYPE_NONE ! Quest Icon : QTYPE_QUEST ? Quest Icon : QTYPE_QUEST2 ! Job Icon : QTYPE_JOB ? Job Icon : QTYPE_JOB2 ! Event Icon : QTYPE_EVENT ? Event Icon : QTYPE_EVENT2 Warg : QTYPE_WARG Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410) Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC, the available color values are: 0 - No Marker 1 - Yellow Marker 2 - Green Marker 3 - Purple Marker When a user shows up on a map, each NPC is checked for questinfo that has been set. If questinfo is present, it will check if the quest has been started, if it has not, the bubble will appear. Optionally, you can also specify a Job Class if the quest bubble should only appear for a certain class. Example izlude,100,100,4 script Test 844,{ mes "[Test]"; mes "Hello World."; close; OnInit: questinfo 1001, QTYPE_QUEST, 0, Job_Novice; end; } I suggesting using some kind of search program to find the npc that use it.
  22. - script dualclientkicker -1,{ OnPCLoadMapEvent: set .@charmap$, strcharinfo(3); if( !compare( .tmp$, .@charmap$ ) ) end; set .@len, query_sql("SELECT DISTINCT `account_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `last_mac` = (SELECT `last_mac` FROM `login` WHERE `account_id`="+getcharid(3)+")) AND `online` <> 0;",.@a); //set .@len, query_sql("select account_id from `char` right join login on login.account_id = `char`.account_id where `char`.online = 1 and login.last_ip = '"+ getcharip() +"'",.@a ); //Annieruru Addition. if(.@len-1) { for( set( .@d, 0 ); .@d < .@len; set( .@d, .@d + 1 ) ) { getmapxy( .@map$, .@x, .@y, 0, rid2name(.@a[.@d]) ); if( .@charmap$ == .@map$ && rid2name(.@a[.@d]) != strcharinfo(0) ) { dispbottom "Duel accounts not allowed in WOE."; warp "geffen",0,0; } } } end; OnInit: setarray .maps$ , "aldeg_cas01", "gefg_cas01", "payg_cas01", "prtg_cas01"; set .lens , getarraysize(.maps$) ; for(set(.a,0);.a<.lens;set(.a,.a+1)) { setmapflag .maps$[.a], mf_loadevent ; set .tmp$ ,.tmp$+.maps$[.a]+","; } }
  23. This isn't a script thing might be source or general....
×
×
  • Create New...