Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by AnnieRuru

  1. Holy sh*t ! I have been scripted battleground script for 3 years and only today I know there's a secret room for this map LOL [paste=21hkxlqx2h6a] EDIT: pls change '.eventlasting = 100;' the value 100 into 20*60 rand__ function is everywhere in this forum just a simple search and you'll find it EDIT: nvm ... function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); if ( !.@count || .@count > .@range ) .@count = .@range; else if ( .@count > 128 ) .@count = 128; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( !getd( ".@tmp1_"+ .@i ) ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; }
  2. maybe can use increase the *sleep time inside OnInit: label ... unfortunately, the way Emistry scripted it, needs to run query_sql every single time to read the `title` from `mission_board` table and accessing query_sql too frequently can lag a server well ... I added it, but remains commented this one possible this one require lots of checking ... its better to just type '@mission' to check your progress unless you understand the script ... otherwise its even hard to tell how to do it because everything from zeny to cashpoints are hard-coded I thought I already fixed them in 1.4 ? 1.6 [paste=ftsocdeysre] - fix the getserverdef script command - increase sleep time inside OnInit to make lesser chance of getting unsorted ID - in commented lines, stop listing the monsters when the kill count reached - in commented lines, added listing for the mission name instead of mission ID though, type @mission is a preferable choice
  3. you need to know ... bumping your topic will not make the script finish faster it depends how much free time on the author's have, its not like bumping the topic will suddenly makes me have more free time you know ? [paste=e6puqfaaqqn] I can do no.2 and no.3, but this no.1 where is the small room ? in bat_a01 there is no small room, and I'm not a map designer that knows how to edit the map either
  4. ahhhhhh ..... that script was tested fine in hercules, and yes this script will bug in rathena because rathena haven't fix this bug yet http://hercules.ws/board/tracker/issue-8008-copyarray-fail-on-a-referenced-array-argument/?gopid=21876#entry21876 use this script instead [paste=ik9doyac29j] EDIT: Line 40~46 should be comment this one ... 0.3 [paste=6z9qpbg0p5uc] those lines has been commented and fix the bug that this event cannot run immediately after the round ended while the registration is full and fix another bug that when player went into another event map, caused the registration array messed up
  5. try this one source http://rathena.org/board/topic/72571-battleground-system-without-waitingroom/ function function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); if ( !.@count || .@count > .@range ) .@count = .@range; else if ( .@count > 128 ) .@count = 128; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( !getd( ".@tmp1_"+ .@i ) ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; }script[paste=2z0keg2hdm4]
  6. http://rathena.org/board/topic/83625-movenpc/#entry267224 after I read this post I have to say ... you idea is not possible, unless have some source modification just like you said, move npc into another map will cause OnTouch to mulfunction so I try to think outside the box ... summon the fireplace as a monster but a monster doesn't has OnTouch, I can only code its AI via mob_skill_db to just act like moonlight MVP doing, healing 1 player at a time making fireplace as a monster also means it will have HPs, knocking it for 10 times (10hp + plant mode) will make it drop back firewood 100% chance ... like that this is probably the easiest way I can think of the nearest that I can think of, is coding an entire new skill something like santuary ... something like land protector so not only need to mess around with making new skills, also needs to mess around with setcell etc etc even though I have a little bit knowledge about source coding, I also have no idea how to code this skill just my imagination though don't worry about this anymore lol look how long I took to reply a topic ...
  7. attachrid(killedrid); set PVPDeaths,PVPDeaths+1; set @PVPDeathstoday,@PVPDeathstoday+1; set #PVPDeathsAccount,#PVPDeathsAccount+1; set getd("$@PVPkilledplayer"+$@PVPcounter+"$"), strcharinfo(0); //again, getd to avoid possible glitches detachrid;change into attachrid(killedrid); if ( killedrid != getcharid(3) ) { set PVPDeaths,PVPDeaths+1; set @PVPDeathstoday,@PVPDeathstoday+1; set #PVPDeathsAccount,#PVPDeathsAccount+1; } set getd("$@PVPkilledplayer"+$@PVPcounter+"$"), strcharinfo(0); //again, getd to avoid possible glitches detachrid;
  8. Poll -> Apakah ada yang berminat melakukan "rAthena translation project" untuk Bahasa Indo/Malay saya berminat dengan tajuk nih sebabnya ... saya dah vote "NO" dah berapa tahun lalunya ... mungkin pada tahun 2005 kalo tak salah masatulah... bila eAthena baru muncul tak lama lagi ... banyak international pun berminat nak bikin translasi projek sendiri mAthena <- namanya untuk bahasa melayu tu bila saya masuk eathena pada tahun 2006, mathena dah lama mati geget pernah tunjuk saya screenshot, saya tak pernah save file tuh ... sayangnya masa tu ... masih banyak lagi member beraktif kat malay/indon forum lebih kurang 20 post setiap hari, tiap2 minggu ada 1~2 guide baru untuk member baru dah aktif macam tuh ... mathena pun boleh mati ... tak usahlah fikir macam sekarang kalo nak bikin yang sama lagi kalo eAthena forum masih ada sekarang, mungkin saya boleh korek topik tu, sebab saya masih indo/malay moderator kat eAthena situ dan kalo juga saya aktif pun ... saya tiada minat nak tolong lagi ... rAthena\npc\ folder tuh, nak tulis semula ... perlu makan berapa masa agaknya ?
  9. considering there's still a lot of my fans members still using rathena might as well update this one although, I'll be more focus at hercules one so over there will be more update unless being told by rathena users 1.4 -- fix getbgusers that's because bgd->members doesn't shift the index due to logout, needs to search whole array
  10. [paste=qzoynvnjiwh] just kinda wants to update this script using newer techniques
  11. ok ... ok ... I know because the script you posted were using very old technique of mine I have to rewrite the whole script from scratch [paste=3k6v0lc64gm2] <--- just a rewrite of previous script you posted with newer techniques now I have to double post after I done your request ... pssshhh....
  12. @Darkpurple asked to update this one so ... noitem_20140828r.diff the difference about this and official is allow_equip_restricted_item just nullify the cards, but mine can unequip them
  13. be grateful, I just setup rathena test server just to answer your question 1. prontera,156,185,6 script kdsjfhsdkfs 100,{ mes "blah"; next; if ( select( "Show me Top 7 highest Zeny", "Show me Top 5 highest Cash Points", "Show me Top 10 Gold Coin holder" ) == 1 ) { .@nb = query_sql( "select name, zeny from `char` left join login on `char`.account_id = login.account_id where group_id < 10 order by zeny desc limit 7", .@name$, .@zeny ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@zeny[.@i] +"Z"; } else if ( @menu == 2 ) { .@nb = query_sql( "select name, value from `char` left join global_reg_value on `char`.account_id = global_reg_value.account_id left join login on `char`.account_id = login.account_id where global_reg_value.str = '#CASHPOINTS' and group_id < 10 group by `char`.account_id order by cast( value as signed ) desc limit 5;", .@name$, .@cash ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@cash[.@i] +" points."; } else { .@nb = query_sql( "select name, amount from inventory left join `char` on inventory.char_id = `char`.char_id left join login on `char`.account_id = login.account_id where nameid = 671 and group_id < 10 order by amount desc limit 10", .@name$, .@amount ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@amount[.@i] +" gold coins."; } close; }2.besides inventory, there also can be storage, carts, guild_storage, mail and auction also, inventory is bound to character storage is bound by account guild storage is bound to a guild auction .... I don't want to think about it it will be just insane to list them all
  14. the reason that I say didn't test was because I was using hercules emulator and hercules doesn't have `global_reg_value` anymore, we have broken them up into 4 different tables by the way ... I forgotten that using IN is a very slow process in mysql -> blame Emistry 1. select zeny, name from `char` where account_id in ( select account_id from login where group_id < 10 ) order by zeny desc limit 7;0.0010 ~ 0.0019 sec select name, zeny from `char` left join login on `char`.account_id = login.account_id where group_id < 10 order by zeny desc limit 7;0.0009 ~ 0.0014 sec2. select name, value from `char` left join acc_reg_num_db on `char`.account_id = acc_reg_num_db.account_id left join login on `char`.account_id = login.account_id where `key` = '#CASHPOINTS' group by `char`.account_id order by value desc;0.0010 ~ 0.0014 sec select `char`.account_id as aaa, ( select name from `char` where account_id = aaa order by char_num limit 1 ), value from `char` left join acc_reg_num_db on `char`.account_id = acc_reg_num_db.account_id where `key` = '#CASHPOINTS' group by `char`.account_id order by value desc;0.0011 ~ 0.0019 secso just have to add 'login.group_id < 10' clause 3. select name, amount from inventory left join `char` on inventory.char_id = `char`.char_id left join login on `char`.account_id = login.account_id where nameid = 671 and group_id < 10 order by amount desc limit 10; tested on hercules prontera,156,185,6 script kdsjfhsdkfs 100,{ mes "blah"; next; if ( select( "Show me Top 7 highest Zeny", "Show me Top 5 highest Cash Points", "Show me Top 10 Gold Coin holder" ) == 1 ) { .@nb = query_sql( "select name, zeny from `char` left join login on `char`.account_id = login.account_id where group_id < 10 order by zeny desc limit 7", .@name$, .@zeny ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@zeny[.@i] +"Z"; } else if ( @menu == 2 ) { .@nb = query_sql( "select name, value from `char` left join acc_reg_num_db on `char`.account_id = acc_reg_num_db.account_id left join login on `char`.account_id = login.account_id where `key` = '#CASHPOINTS' and group_id < 10 group by `char`.account_id order by value desc limit 5", .@name$, .@cash ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@cash[.@i] +" points."; } else { .@nb = query_sql( "select name, amount from inventory left join `char` on inventory.char_id = `char`.char_id left join login on `char`.account_id = login.account_id where nameid = 671 and group_id < 10 order by amount desc limit 10", .@name$, .@amount ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@amount[.@i] +" gold coins."; } close; }have fun convert `acc_reg_num_db` into `global_reg_value`
  15. prontera,156,185,6 script kdsjfhsdkfs 100,{ warp "guild_vs2", 49,49; deltimer strnpcinfo(0)+"::Onaaa"; deltimer strnpcinfo(0)+"::Onbbb"; addtimer 7000, strnpcinfo(0)+"::Onaaa"; end; Onaaa: if ( strcharinfo(3) != "guild_vs2" ) end; addtimer 3000, strnpcinfo(0)+"::Onbbb"; dispbottom "last 3 mins to kill or will be kicked out"; end; Onbbb: if ( strcharinfo(3) != "guild_vs2" ) end; warp "Save", 0,0; dispbottom "You have been kick beacuse of failure to kill"; end; OnPCKillEvent: if ( strcharinfo(3) != "guild_vs2" ) end; // if ( killedrid == getcharid(3) ) end; deltimer strnpcinfo(0)+"::Onaaa"; deltimer strnpcinfo(0)+"::Onbbb"; addtimer 7000, strnpcinfo(0)+"::Onaaa"; end; } guild_vs2 mapflag pvp
  16. 1. select zeny, name from `char` where account_id in ( select account_id from login where group_id < 10 ) order by zeny desc limit 7;2. select name, value from `char` inner join global_reg_value on `char`.char_id = global_reg_value.char_id where global_reg_value.str = '#CASHPOINTS' and `char`.account_id in ( select account_id from login where group_id < 10 ) order by cast( value as signed ) desc limit 7;this is a request so ... prontera,156,185,6 script kdsjfhsdkfs 100,{ mes "blah"; next; if ( select( "Show me Top 7 highest Zeny", "Show me Top 5 highest Cash Points" ) == 1 ) { .@nb = query_sql( "select zeny, name from `char` where account_id in ( select account_id from login where group_id < 10 ) order by zeny desc limit 7", .@zeny, .@name$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@zeny[.@i] +"Z"; } else { .@nb = query_sql( "select name, value from `char` inner join global_reg_value on `char`.char_id = global_reg_value.char_id where global_reg_value.str = '#CASHPOINTS' and `char`.account_id in ( select account_id from login where group_id < 10 ) order by cast( value as signed ) desc limit 5", .@name$, .@cash ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" - "+ .@cash[.@i] +" points."; } close; }I also didn't test
  17. ( actually I'm still consider as MIA ... hehehe because its rare for you to ask a question so I want to repay your kindness by answering your question ^.^ ) nonono ... you DON'T attach everyone on the server just to loop a player timer you have to remember that addrid runs the script simultaneously equal to the number of player attached to the script if there are 10 players near the fireplace, this script will be running 10 times, after 10 seconds, if there are still 5 players still standing within the 5x5 grid, it will be run 10x5 = 50 times and its quite hard to detachrid because there are no original RID when the script started you can just use OnTouch with sleep, while(!getmapxy) method to solve this particular problem here's the script revised, its far easier like this prontera,155,170,4 script Campfire 723,5,5,{ dispbottom "[Debug] these players was within this fireplace in last 2 seconds"; .@size = getarraysize( .aid ); for ( .@i = 0; .@i < .@size; .@i++ ) if ( isloggedin( .aid[.@i] ) ) dispbottom rid2name( .aid[.@i] ); end; OnTouch: while ( getcharid(3) != .aid[.@i] && .@i < getarraysize(.aid) ) .@i++; if ( .@i < getarraysize(.aid) ) end; .aid[.@i] = getcharid(3); end; OnInit: getmapxy .map$, .x, .y, 1; while (1) { .@size = getarraysize( .aid ); for ( .@i = 0; .@i < .@size; .@i++ ) { if ( isloggedin( .aid[.@i] ) ) { attachrid .aid[.@i]; getmapxy .@map$, .@x, .@y, 0; // dispbottom !strcmp( .@map$, .map$ ) +" "+ distance( .@x, .@y, .x, .y ); if ( !strcmp( .@map$, .map$ ) && distance( .@x, .@y, .x, .y ) <= 5 ) { if ( countitem(604) ) { if ( !.fire ) { setnpcdisplay strnpcinfo(0), strnpcinfo(0), 802; .fire = 1; } delitem 604, 1; break; } } else { deletearray .aid[.@i], 1; .@i--; .@size--; } } else { deletearray .aid[.@i], 1; .@i--; .@size--; } } detachrid; // announce .@i +" "+ .@size +" "+( .@i == .@size )+" "+ .@fire, 0; if ( .@i == .@size && .fire ) { setnpcdisplay strnpcinfo(0), strnpcinfo(0), 723; .fire = 0; } sleep 2000; } end; }so, your title which is -> addrid + looping <- are not existbecause addrid is not a command that is meant to be loop I rather think, addrid shouldn't be using in an event script, its meant for utility scripts only btw ... I always thought that survival script are more like ... it ask you to put in how many firewood, then the fireplace will burn according to how many firewood that you have placed ?
  18. random drop (including equipped) - script kjhfksjdf -1,{ OnPCDieEvent: if ( strcharinfo(3) != "prontera" ) end; // set your map if ( pkpoints < 100 ) end; // decide on the pk points getinventorylist; if ( !@inventorylist_count ) end; .@r = rand( @inventorylist_count ); delitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; getmapxy .@map$, .@x, .@y, 0; makeitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], .@map$, .@x, .@y, @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; end; }random drop (don't drop equipped items) function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); if ( !.@count || .@count > .@range ) .@count = .@range; else if ( .@count > 128 ) .@count = 128; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( !getd( ".@tmp1_"+ .@i ) ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; } - script kjhfksjdf2 -1,{ OnPCDieEvent: if ( strcharinfo(3) != "prontera" ) end; // set your map if ( pkpoints < 100 ) end; // decide on the pk points getinventorylist; if ( !@inventorylist_count ) end; callfunc "rand__", @inventorylist_count, $@r; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) if ( !@inventorylist_equip[ .@i[ $@r ] ] ) break; .@r = .@i[ $@r ]; delitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; getmapxy .@map$, .@x, .@y, 0; makeitem2 @inventorylist_id[.@r], @inventorylist_amount[.@r], .@map$, .@x, .@y, @inventorylist_identify[.@r], @inventorylist_refine[.@r], @inventorylist_attribute[.@r], @inventorylist_card1[.@r], @inventorylist_card2[.@r], @inventorylist_card3[.@r], @inventorylist_card4[.@r]; end; }
  19. http://rathena.org/board/topic/91479-how-to-change-the-time-of-koe-event-every-saturday/?p=240761
  20. http://rathena.org/board/pastebin/4ryaa5wz3bu1/ - fix mission completion will update every rows on that player's mission ID, it should only update on non-completed mission - fix repeatable option doesn't work correctly - fix redo-delay doesn't work at all
  21. just change @dota_title_kill into dota_title_kill ....
  22. simple ... add these lines under OnPCKillEvent: if ( @last_player_kill == killedrid ) { @dota_title_kill = 0; dispbottom "Your killing streak has been reset due to killing same player multiple times"; end; } @last_player_kill = killedrid; [paste=3xv6jbierwqi]
  23. cannot reproduce your problem since I actually use @reloadscript to actually test the script how about you show me some screens shots
  24. you have to give the name of the map otherwise we don't know how to start however if you are using hercules, hercules instance system support to create a map without anybody to attach you don't even need to use custom maps http://rathena.org/board/pastebin/48t1cptx7j2r/
  25. db\re\instance_db.txt 12,MvP Ladder Game,86400,guild_vs2-2,49,49,guild_vs2-2 http://rathena.org/board/pastebin/6r2cl8yxm2ff/
×
×
  • Create New...