Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Community Answers

  1. AnnieRuru's post in Upgrade Annieruru Mission Board? was marked as the answer   
    2.5 add F_MesItemInfo
    https://drive.google.com/file/d/1qwY8ZZFhEsLd28OZYaQvSIhyX2dVe8IJ/view
     
    I also add into item requirement field, just because I feel like it =/
  2. AnnieRuru's post in Skill point remover? was marked as the answer   
    so you also changed the max job level to 90, so its custom I see
    yes, exactly what I want to say
  3. AnnieRuru's post in [Error]: buildin_getmapxy: was marked as the answer   
    LMAO !!! this script was made for over 4 years, and only today I found out it has a bug
    http://herc.ws/board/topic/11445-sameip-command-for-rathena/
    .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@aid, .@cid, .@ip$ ); look closely, name, char_id, account_id, === BUT .@name$, .@aid, .@cid
    up version 0.3
    //===== Hercules Script ====================================== //= @sameip //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 0.3 //===== Compatible With: ===================================== //= Hercules 2019-02-01 //===== Description: ========================================= //= list all players with same ip address //===== Topic ================================================ //= https://rathena.org/board/topic/118137-error-buildin_getmapxy/ //===== Additional Comments: ================================= //= it always list all players online, unable to limit to a single map currently //============================================================ - script kjdshfksfj FAKE_NPC,{ OnInit: bindatcmd "sameip", strnpcinfo(0)+"::Onaaa"; end; Onaaa: freeloop true; .@nb = query_sql( "select name, char_id, account_id as aaa, ( select last_ip from login where account_id = aaa ) from `char` where online = 1", .@name$, .@cid, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; ++.@i ) { for ( .@j = 0; .@j < .@ip_list; ++.@j ) if ( .@b_ip$[.@j] == .@ip$[.@i] ) break; if ( .@j == .@ip_list ) { .@b_ip$[.@j] = .@ip$[.@i]; ++.@ip_list; } setd ".@b_ip"+ .@j +"_name$["+ .@b_ip_size[.@j] +"]", .@name$[.@i]; setd ".@b_ip"+ .@j +"_cid["+ .@b_ip_size[.@j] +"]", .@cid[.@i]; setd ".@b_ip"+ .@j +"_aid["+ .@b_ip_size[.@j] +"]", .@aid[.@i]; ++.@b_ip_size[.@j]; } dispbottom "===== SAME IP Searching ====="; for ( .@i = 0; .@i < .@ip_list; ++.@i ) { if ( .@b_ip_size[.@i] > 1 ) { dispbottom " == The IP ["+ .@b_ip$[.@i] +"] has "+ .@b_ip_size[.@i] +" players."; for ( .@j = 0; .@j < .@b_ip_size[.@i]; ++.@j ) { getmapxy .@map$, .@x, .@y, UNITTYPE_PC, getd( ".@b_ip"+ .@i +"_aid["+ .@j +"]"); dispbottom " = "+( .@j +1 )+". ("+ getd( ".@b_ip"+ .@i +"_cid["+ .@j +"]" ) +") "+ getd( ".@b_ip"+ .@i +"_name$["+ .@j +"]") +" -> "+ .@map$ +" "+ .@x +" "+ .@y; } ++.@result; } } dispbottom ">>> "+ .@result +" results found."; end; }  
    EDIT: I think should write another version 0.4 since rathena has already upgrade the script engine quite some time ago
    the only optimization I can think of is using inarray script command, so nah
  4. AnnieRuru's post in Please Help Me ( Item Script ) was marked as the answer   
    if(getrefine()>5) {bonus bInt,20;} means if refine is equal to 6 or above
    if you want it 5 or above, should use >=
    if(getrefine()>=5) {bonus bInt,20;}  
  5. AnnieRuru's post in Monster level not showing was marked as the answer   
    this is server side, you post wrong section
    https://github.com/HerculesWS/Hercules/pull/2358
    yup this problem also happens in hercules, thanks for reporting ~
     
     
    EDIT: apparently, just type /showname will display correctly
    or when diff the client, disable one of the recommend, "Enable /showname"
  6. AnnieRuru's post in Help Restriction Stylist NPC was marked as the answer   
    setarray .@min[1], 1, // Hair style 0 crashed my client last time I tested. 0, 0; hmm... just tested hair style 0 works in my hexed client
    perhaps its different in every client version
    or maybe you just missing that palette
    if(!.@opt) { stand; getmapxy .@m$,.@x,.@y,UNITTYPE_PC; unitwalk getcharid(3),.@x,.@y - 1; } hmm ? rathena seems to be missing setunitdir
    ok try 1 more time
    //===== rAthena Script ====================================== //= Stylist npc //===== By: ================================================== //= AnnieRuru //= original by Euphy //===== Current Version: ===================================== //= 1.3 //===== Compatible With: ===================================== //= rAthena 2019-01-24 //===== Description: ========================================= //= stylist npc //===== Topic ================================================ //= https://rathena.org/board/topic/118030-help-restriction-stylist-npc/ //===== Additional Comments: ================================= //= 1 more time, this time use CSV method, this method is understood by many //============================================================ prontera,165,176,1 script Stylist HIDDEN_NPC,{ .@choose = select( "Hair style", "Hair color", "Cloth color" ) -1; .@lookpart = .@part = .look[.@choose]; if ( BaseClass == Job_Summoner ) .@part += Job_Summoner; .@revert = .@i = inarray( getd(".list"+ .@part), getlook( .@lookpart ) ); while ( true ) { setlook .@lookpart, getd(".list"+ .@part +"["+ .@i +"]"); dispbottom "This is style #"+ getd(".list"+ .@part +"["+ .@i +"]") +"."; .@next = ( .@i == .maxindex[.@part] )? 0 : .@i+1; .@previous = ( .@i == 0 )? .maxindex[.@part] : .@i-1; switch ( select( " ~ Next (^0055FF"+ getd(".list"+ .@part +"["+ .@next +"]") +"^000000)", " ~ Previous (^0055FF"+ getd(".list"+ .@part +"["+ .@previous +"]") +"^000000)", " ~ Jump to...", " ~ Revert to original (^0055FF"+ getd(".list"+ .@part +"["+ .@revert +"]") +"^000000)" ) ) { case 1: .@i = .@next; break; case 2: .@i = .@previous; break; case 3: dispbottom "Choose a style between 0 - "+ .maxstyles[.@part] +"."; input .@num; .@j = inarray( getd(".list"+ .@part), .@num ); if ( .@j == -1 ) dispbottom "That style is unavailable"; else .@i = .@j; break; case 4: .@i = .@revert; } } end; OnInit: // .list$[LOOK_HAIR] = "0-5,11-18,20-23"; .list$[LOOK_HAIR] = "0-"+ getbattleflag("max_hair_style"); .list$[LOOK_HAIR_COLOR] = "0-"+ getbattleflag("max_hair_color"); .list$[LOOK_CLOTHES_COLOR] = "0-"+ getbattleflag("max_cloth_color"); .list$[Job_Summoner + LOOK_HAIR] = "0-"+ getbattleflag("max_hair_style"); .list$[Job_Summoner + LOOK_HAIR_COLOR] = "0-"+ getbattleflag("max_hair_color"); .list$[Job_Summoner + LOOK_CLOTHES_COLOR] = "0-1"; freeloop true; setarray .look[0], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR, Job_Summoner + LOOK_HAIR, Job_Summoner + LOOK_HAIR_COLOR, Job_Summoner + LOOK_CLOTHES_COLOR; for ( .@i = 0; .@i < 6; ++.@i ) { deletearray .@array$; .@index = 0; explode( .@array$, .list$[.look[.@i]], "," ); .@size = getarraysize(.@array$); for ( .@j = 0; .@j < .@size; ++.@j ) { if ( compare( .@array$[.@j], "-" ) ) { explode( .@range$, .@array$[.@j], "-" ); .@min = atoi(.@range$[0]); .@max = atoi(.@range$[1]); .@range = .@max - .@min +1; for ( .@k = 0; .@k < .@range; ++.@k ) setd ".list"+ .look[.@i] +"["+( .@index++ )+"]", .@min + .@k; } else setd ".list"+ .look[.@i] +"["+( .@index++ )+"]", atoi( .@array$[.@j] ); } .maxindex[.look[.@i]] = .@index -1; .maxstyles[.look[.@i]] = getd(".list"+ .look[.@i] +"["+( .@index -1 )+"]"); } end; }  
  7. AnnieRuru's post in Mobs on server start was marked as the answer   
    ok dynamic_mob is ...
    if you turn it on, the monster wont spawn on unpopulated maps, it only loads the monsters when there is a player warp in
    if you turn it off, monster spawn on all maps, and this takes a lot of server resources
    means MVP ALWAYS respawn on server start/@reloadscript
    // Dynamic Mobs Options // Use dynamic mobs? (recommended for small-medium sized servers) dynamic_mobs: true // Remove Mobs even if they are hurt mob_remove_damaged: true // Delay before removing mobs from empty maps (default 5 min = 300 secs) mob_remove_delay: 300000 this is the default setting, its default to ON
    this means the server only loads the resources needed when a player warp into the map
    once you leave the map and left it empty for 5 minutes, the server will remove all the monsters in the map, until someone warp in again
     
    yes, this is not implemented,
    even if someone attempt to do this, there has to be a SQL database to store all the respawn timer, the unique monster ID ... and so on, big project
    spawn immediately the moment any player warp in the map
    this is the idea of dynamic_mob, so your server doesn't use up too much resources
  8. AnnieRuru's post in npc that adds slot into glasses was marked as the answer   
    function script F_MesItemInfo { .@item = getarg(0); return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", getitemname(.@item), .@item); } prontera,155,185,5 script skdfjhskdf 1_F_MARIA,{ if ( !countitem(2201) ) { mes "I need a "+ F_MesItemInfo(2201); close; } if ( Zeny < 1000 ) { mes "you don't have a thousand zeny"; close; } disable_items; mes "Are you sure you want to exchange your sunglasses into slotted on in 1/10 chance ?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( !countitem(2201) ) { // just a double check mes "I need a "+ F_MesItemInfo(2201); close; } if ( Zeny < 1000 ) { mes "you don't have a thousand zeny"; close; } Zeny -= 1000; if ( rand(100) < 10 ) { delitem 2201, 1; getitem 2202, 1; mes "your "+ F_MesItemInfo(2201) +" now has slot"; emotion ET_BEST; } else { delitem 2201, 1; mes "it fails"; emotion ET_SORRY; } close; } script_commands.txt is your best friend
  9. AnnieRuru's post in EA Job System? was marked as the answer   
    prontera,163,171,3 script PvP Arena Guardian 966,{ .@eaj = eaclass(); mes "[Guardian]"; mes "Greeting Warriors, which PvP room you wish to enter ?"; next; switch(select("3rd Job Arena", "2nd Job Arena", "All Job Arena")) { case 1: if ( (.@eaj & EAJL_THIRD) || (.@eaj & EAJ_KAGEROUOBORO) == EAJ_KAGEROUOBORO || (.@eaj & EAJ_KAGEROUOBORO) == EAJ_KAGEROUOBORO ) { close2; switch( rand(4) ) { case 1: warp "guild_vs3",16,49; end; case 2: warp "guild_vs3",50,83; end; case 3: warp "guild_vs3",83,50; end; default: warp "guild_vs3",50,16; end; } } else { mes "Only 3rd Jobs are allowed in this arena."; close; } end; case 2: if ( Upper == 1 && (.@eaj & EAJL_2) && (.@eaj & EAJL_THIRD) == false && (.@eaj & EAJ_KAGEROUOBORO) != EAJ_KAGEROUOBORO && (.@eaj & EAJ_KAGEROUOBORO) != EAJ_KAGEROUOBORO ) { switch( rand(4) ) { case 1: warp "guild_vs2",89,49; end; case 2: warp "guild_vs2",50,89; end; case 3: warp "guild_vs2",9,50; end; default: warp "guild_vs2",49,10; end; } } else { mes "This arena is only for 2nd jobs"; close; } end; case 3: close2; switch( rand(4) ) { case 1: warp "pvp_n_1-5",99,134; end; case 2: warp "pvp_n_1-5",133,100; end; case 3: warp "pvp_n_1-5",100,65; end; default: warp "pvp_n_1-5",66,99; end; } end; } } now only I understand what you are trying to do....
    this one should fix it
     
    yeah my fault, didn't know you are making this for pvp room script, now this make sense
    now those who satisfy the 1st option, cannot go inside the 2nd option room
     
    rand(4) is random number between 0~3
    so just change your case 4 into default: case
  10. AnnieRuru's post in Vending Controller was marked as the answer   
    hmm ? this script was actually written in mind by having plugin installed ...
    however rathena members seems very interested in this script indeed
    you can just disable the min_npc_vendchat_distance from battle config
     
    just test on rAthena test server, couldn't reproduce your problem
     
    try start with only 2 elements in your array, then expend slowly by @reloadscript
  11. AnnieRuru's post in MSQL MISSION BOARD was marked as the answer   
    as far as I understand, Emistry has dropped support for his SQL type script
    however, my version which doesn't use SQL at all, I still can fix it if anyone reporting bugs
     
  12. AnnieRuru's post in Duel script_command was marked as the answer   
    src/map/battle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index bd93370fb..8df9921fe 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7643,6 +7643,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { + struct map_session_data *sd = BL_CAST( BL_PC, s_bl ); + struct map_session_data *tsd = BL_CAST( BL_PC, t_bl ); + if ( sd->status.account_id == 2000000 && tsd->status.account_id == 2000001 || sd->status.account_id == 2000001 && tsd->status.account_id == 2000000 ) + return 1; + } + if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB  
    And THIS is the MOTHER of all FACTION script
    src/map/battle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index bd93370fb..769d0fc98 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -7643,6 +7643,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; + if ( s_bl->type == BL_PC && t_bl->type == BL_PC ) { + struct map_session_data *sd = BL_CAST( BL_PC, s_bl ); + struct map_session_data *tsd = BL_CAST( BL_PC, t_bl ); + if ( pc_readglobalreg( sd, add_str("faction") ) != pc_readglobalreg( tsd, add_str("faction") ) ) + return 1; + } + if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB prontera,155,185,5 script ksjfdhsk 1_F_MARIA,{ input faction; }  
     
  13. AnnieRuru's post in Rolling in the deep was marked as the answer   
    /* can only bet these item types - `IT_WEAPON`: 4 - `IT_ARMOR`: 5 - `IT_CARD`: 6 - `IT_PETEGG`: 7 - `IT_PETARMOR`: 8 */ prontera,155,185,5 script sfksfjhsfj 1_F_MARIA,{ if ( .start == 1 ) goto L_StartEvent; // goto is evil, but it actually helps make script higher readability else if ( .start == 2 ) { mes "Currently rolling dice ... please be patient"; close; } mes "select an item from your inventory to bet"; next; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( @inventorylist_equip[.@i] == 0 && @inventorylist_identify[.@i] == true && @inventorylist_attribute[.@i] == false && @inventorylist_expire[.@i] == 0 && @inventorylist_bound[.@i] == BOUND_NONE && ( getiteminfo( @inventorylist_id[.@i], 2 ) == IT_WEAPON || getiteminfo( @inventorylist_id[.@i], 2 ) == IT_ARMOR || getiteminfo( @inventorylist_id[.@i], 2 ) == IT_CARD || getiteminfo( @inventorylist_id[.@i], 2 ) == IT_PETEGG || getiteminfo( @inventorylist_id[.@i], 2 ) == IT_PETARMOR ) ) { .@itemname$ = callfunc( "getitemname2", @inventorylist_id[.@i], @inventorylist_identify, @inventorylist_refine, @inventorylist_attribute, @inventorylist_card1, @inventorylist_card2, @inventorylist_card3, @inventorylist_card4 ); .@menu$ = .@menu$ + @itemname2_info$ + .@itemname$ +"; "+ @inventorylist_amount[.@i] +" ea.:"; .@id[.@c] = @inventorylist_id[.@i]; .@refine[.@c] = @inventorylist_refine[.@i]; .@card1[.@c] = @inventorylist_card1[.@i]; .@card2[.@c] = @inventorylist_card2[.@i]; .@card3[.@c] = @inventorylist_card3[.@i]; .@card4[.@c] = @inventorylist_card4[.@i]; ++.@c; } } if ( !.@c ) { mes "you don't have anything useful to bet !"; close; } .@s = select(.@menu$) -1; .@id = .@id[.@s]; .@refine = .@refine[.@s]; .@card1 = .@card1[.@s]; .@card2 = .@card2[.@s]; .@card3 = .@card3[.@s]; .@card4 = .@card4[.@s]; .@itemname$ = callfunc( "getitemname2", .@id, 1, .@refine, 0, .@card1, .@card2, .@card3, .@card4 ); mes "Are you sure you want to auction your"; mes .@itemname$ +" away ?"; next; if ( select( "Yes", "No" ) == 2 ) close; mes "select the amount of "+ getitemname( .currency ) +" for the player to bet"; next; if ( input( .@amount, 1, 30000 ) ) { mes "you have input invalid value"; close; } mes "Confirm ?"; mes .@itemname$; mes .@amount +"x "+ getitemname( .currency ); if ( select ( "Yes", "No" ) == 2 ) close; close2; if ( !countitem2( .@id, 1, .@refine, 0, .@card1, .@card2, .@card3, .@card4 ) ) { dispbottom "please don't hack"; end; } if ( .start != 0 ) { dispbottom "Too slow, somebody make it faster than you"; end; } announce strcharinfo(0) +" is trying to auction "+ .@itemname$ +" !!", bc_all; delitem2 .@id, 1, 1, .@refine, 0, .@card1, .@card2, .@card3, .@card4; .id = .@id; .refine = .@refine; .card1 = .@card1; .card2 = .@card2; .card3 = .@card3; .card4 = .@card4; .aid = getcharid(3); .cid = getcharid(0); .amount = .@amount; .itemname$ = .@itemname$; .start = true; initnpctimer; end; L_StartEvent: mes "Currently there are "+ .total_bet +" players betting."; for ( .@i = 0; .@i < .total_bet; ++.@i ) mes ( .@i +1 )+". "+ rid2name(.bet_aid[.@i]); next; if ( getcharid(3) == .aid ) { mes "You are the one who placed this bet"; close; } if ( .total_bet >= .register_limit ) { mes "only accept 10 maximum bets"; close; } .@i = 0; while ( .bet_aid[.@i] != getcharid(3) && .@i < .total_bet ) ++.@i; if ( .@i < .total_bet ) { mes "You already placed the bet"; close; } mes "Are you sure you want bet"; mes .amount +"x "+ getitemname( .currency ) +" for "; mes .itemname$ +" ?"; next; if ( select ( "Yes", "No" ) == 2 ) close; if ( countitem( .currency ) < .amount ) { mes "the minimum bet is "+ .amount +"x "+ getitemname( .currency ); close; } if ( .start != 1 ) { mes "Too late"; close; } delitem .currency, .amount; announce strcharinfo(0) +" has placed "+( ( Sex )? "his":"her" )+" bet for "+ .itemname$, bc_npc|bc_area; .bet_aid[.total_bet] = getcharid(3); .bet_cid[.total_bet] = getcharid(0); ++.total_bet; close; OnTimer15000: // 15 seconds stopnpctimer; .start = 2; announce "betting is now close. Start counting now", bc_npc|bc_area; sleep 1000; announce "There are "+ .total_bet +" players bet on "+ .itemname$, bc_npc|bc_area; sleep 1000; .@amount = 1; // this stupid mail system ... .@zeny = 0; .@give_amount = .amount * .total_bet; // why do I have to make these stupid variables ?? if ( !.total_bet ) { announce "this auction has failed because nobody is joining", bc_npc|bc_area; mail .cid, "Rolling in the Deep", "Prize", "Nobody bet on your item, you get a refund", .@zeny, .id, .@amount, .card1, .card2, .card3, .card4; } else { .@r = rand(.total_bet); announce "The winner is "+ rid2name(.bet_aid[.@r]) +" !!", bc_npc|bc_area; mail .bet_cid[.@r], "Rolling in the Deep", "Prize", "This is your prize.", .@zeny, .id, .@amount, .card1, .card2, .card3, .card4; mail .cid, "Rolling in the Deep", "Prize", "There were "+ .total_bet +" players bet on your item.", .@zeny, .currency, .@give_amount; } .start = false; .id = 0; .refine = 0; .card1 = 0; .card2 = 0; .card3 = 0; .card4 = 0; .aid = 0; .amount = 0; .itemname$ = ""; deletearray .bet_aid; deletearray .bet_cid; .total_bet = 0; end; OnInit: .currency = 7539; // Poring_Coin .register_limit = 10; // only 10 people can join end; }  
    LOL when I saw n0ttt post came out I was like ... WAH~~
    somebody can actually finish script faster than me @_@
     
    EDIT: forgot to tell the getitemname2 function, not from this topic ... 2.3
    but from hercules ones, 2.4
    https://herc.ws/board/topic/11275-getitemname2/
    rathena one is version 2.3 made on 2013
    hercules has version 2.4 made on 2015
     
    EDIT2: Radian say cannot bet equipped items, so just add @inventorylist_equip check
  14. AnnieRuru's post in i got error when applying custom commands. was marked as the answer   
    woot, just now @Radian also told me the same thing, now I have to double check
    you are right, somehow the permanent monster spawn script does let the *getmapunits script command catch the dead monsters as still being alive
    have to make Hp check this time
    // pre-re/mobs/fields/prontera.txt //================================================== // prt_fild07 - Prontera Field //================================================== prt_fild07,0,0 monster Rocker 1052,80 prt_fild07,0,0 monster Poporing 1031,30 prt_fild07,0,0 monster Vocal 1088,1,1800000,1200000 prt_fild07,225,110,5,5 monster Black Mushroom 1084,3,360000,180000 - script sdjflsdf -1,{ OnInit: bindatcmd "mapmoblist", strnpcinfo(0)+"::Onaaa"; end; Onaaa: if ( .@atcmd_numparameters ) { if ( getmapusers(.@atcmd_parameters$) == -1 ) { dispbottom "Map not exist"; end; } .@map$ = .@atcmd_parameters$; } else .@map$ = strcharinfo(3); .@size = getmapunits( BL_MOB, .@map$, .@bl ); freeloop true; for ( .@i = 0; .@i < .@size; ++.@i ) { .@string$ = rid2name(.@bl[.@i]); if ( !getd(".@"+ .@string$) ) { .@mobname$[.@c] = .@string$; getunitdata .@bl[.@i], .@unitdata; .@mobx[.@c] = .@unitdata[UMOB_X]; .@moby[.@c] = .@unitdata[UMOB_Y]; .@mobhp[.@c] = .@unitdata[UMOB_HP]; .@mobmaxhp[.@c] = .@unitdata[UMOB_MAXHP]; ++.@c; } setd ".@"+ .@string$, getd(".@"+ .@string$) +1; } dispbottom " === These are monsters in "+ .@map$ +" ==="; for ( .@i = 0; .@i < .@c; ++.@i ) if ( getd(".@"+ .@mobname$[.@i]) > 1 || .@mobhp[.@i] ) dispbottom ( ++.@j )+". "+ .@mobname$[.@i] +" : "+ getd(".@"+ .@mobname$[.@i])+"x"; if ( getgmlevel() < 99 ) end; // admin only access, lucky you mention it so I make extra checks dispbottom " === Location of unique monsters === "; for ( .@i = 0; .@i < .@c; ++.@i ) if ( getd(".@"+ .@mobname$[.@i]) == 1 && .@mobhp[.@i] ) dispbottom .@mobname$[.@i] +" --> X = "+ .@mobx[.@i] +" Y = "+ .@moby[.@i] +" | Hp left = "+ .@mobhp[.@i] +"/"+ .@mobmaxhp[.@i]; end; }  
    then I have to take a look at the @whosell source code seriously =/
    I was actually joking when I only use @whosell on the *searchstore script command
    hmm ... cash items means item type 18 ... means only look for items not IT_CASH type
    ... and I probably not going to do it, I think searchstore features is complete ... isn't it ?
  15. AnnieRuru's post in refining the wrong item :( was marked as the answer   
    hercules still haven't made this change, so the value still the same with eamod
    hercules ->
    EQI_HEAD_TOP (1) - Upper head gear EQI_ARMOR (2) - Armor (Where you keep your Jackets and Robes) EQI_HAND_L (3) - What is in your Left hand. EQI_HAND_R (4) - What is in your Right hand. EQI_GARMENT (5) - The garment slot (Mufflers, Hoods, Manteaus) EQI_SHOES (6) - What foot gear the player has on. EQI_ACC_L (7) - Accessory 1. EQI_ACC_R (8) - Accessory 2. EQI_HEAD_MID (9) - Middle Headgear (masks and glasses) EQI_HEAD_LOW (10) - Lower Headgear (beards, some masks) rathena ->
    EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons)  
    curious ... you are switching to rathena ?
    you no longer follow the value by eamod/hercules ...
  16. AnnieRuru's post in downrefitem debug was marked as the answer   
    nope, its the source code
    I still remember this ... since eathena times,
    the script command actually return 1; means false -> show a debug message
    and return 0; means success
    https://github.com/rathena/rathena/blob/master/src/map/script.hpp#L128
    that's why when you do return SCRIPT_CMD_SUCCESS;, actually means return 0;
    all you have to do is change return 1; into return 0; into the source code,
    and return 0; into return 1; .... if you are still using eamod
    btw,
    hercules did it by swap the return 0; into return true;
    rathena did it by return SCRIPT_CMD_SUCCESS;
  17. AnnieRuru's post in Random Treasure Box in Castle was marked as the answer   
    what Euphy suggested there is the treasure box for each castle has its own set of treasure chests
    eg: castle 1 and castle 2 spawn different sets of treasure chests
    but what I see on your script is ALL castle spawn randomly -> all the same ID
    this makes things easier
    change this line 1273
    monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"+.@i; into
    monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest", F_Rand(1324,1326,1328,1330,1332,1334,1336,1338,1340,1342,1344,1346,1348,1350,1352,1354,1356,1358,1360,1362), 1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"+.@i;  
  18. AnnieRuru's post in script_rid2sd: fatal error ! HELP! was marked as the answer   
    announce "[Fast-Type Event] : Next round starts in 5 seconds.",bc_map,0x00FFFF; ---- Change into ----> announce "[Fast-Type Event] : Next round starts in 5 seconds.",bc_map|bc_npc,0x00FFFF; almost all of it needs to add bc_npc flag for the 1st script
     
    2nd script however need to use mapannounce, since the monster spawn in other maps
    announce "[Find the Plant] : "+.spawnplant+" plants have been spawned in the event area.",bc_map,0x00FFFF; ------ Change into -----> mapannounce .Map$, "[Find the Plant] : "+.spawnplant+" plants have been spawned in the event area.", bc_map, 0x00FFFF;  
  19. AnnieRuru's post in CTP event? was marked as the answer   
    prontera,155,185,5 script Click-The-Pub 1_F_MARIA,{ end; OnWhisperGlobal: if ( getgmlevel() >= 99 ) goto OnMinute00; end; OnMinute00: delwaitingroom; waitingroom "Click ME", 2, strnpcinfo(0)+"::OnWinner", 1; end; OnWinner: warpwaitingpc "prontera", 155, 182, 1; attachrid $@warpwaitingpc; if ( !checkweight( 501,1 ) ) { dispbottom "LOL you don't have enought space to get a reward"; end; } getitem 501, 1; announce "Click the Pub: Winner is "+ strcharinfo(0) +" !!", bc_all; delwaitingroom; end; }  
  20. AnnieRuru's post in PvP Ranking & SQL was marked as the answer   
    curious .... do you actually mean telling others to make their own ladder type algorithm ... script ?
    I'm actually interested if you can show me your txt style ladder script ?
     
     
    .@rand = rand(10,20); query_sql "insert into `mvp_ranking value ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) "', 0 ) on duplicate key update points = IF( points - "+ .@rand +" < 0, 0, points - "+ .@rand +" )";  
  21. AnnieRuru's post in WoE Random Castle was marked as the answer   
    its been awhile since I wrote a custom woe script
    http://herc.ws/board/topic/4848-woe-castle-auto-assign-on-guild/
    this kind of request doesn't pop up often
    http://upaste.me/8a6849899fca594c7
    anyway tomorrow I'll do the official woe script ones, this one is just a template
    go to sleep 1st
  22. AnnieRuru's post in Pleeas help me to fix disconnect my simple anti bot script was marked as the answer   
    [Error]: script_set_reg: failed to set param 'Zeny' to -37769. [Debug]: Source (NPC): AntiBot (invisible/not on a map) make sure you put Zeny check before deducting Zeny...
    and probably check Zeny if overflow if the condition is true
    just put atcommand "@kick "+ strcharinfo(0); if you want to kick players
  23. AnnieRuru's post in Zeny on Kills was marked as the answer   
    conf\battle\monster.conf
    // Zeny from mobs zeny_from_mobs: yes its a yes/no condition though, because the formula is hard-coded ... mob.cpp
    if(battle_config.zeny_from_mobs && md->level) { // zeny calculation moblv + random moblv [Valaris] zeny=(int) ((md->level+rnd()%md->level)*per*bonus/100.); if(md->db->mexp > 0) zeny*=rnd()%250; }  
  24. AnnieRuru's post in Zeny in separate table was marked as the answer   
    that's the fun part why I did that
    did you noticed 705,032,704 + Your current Zeny = MAX_ZENY ?
    hmm ... maybe I should split it out and tell the players why the value shrink instead ? hmm ....
     
    http://upaste.me/2c6e4982211843700
    yeah not that hard
  25. AnnieRuru's post in A battleground idea :D was marked as the answer   
    basically is a modification from this topic
    instead of killing the leader minus 2 points, you just want the leader killed immediately and win the round
    http://upaste.me/bb1949814ef80ce94
    I am sure only the scripts that's useful for learning purpose can go inside the github
    example like devil square ... shows how to kill monster round by round
    the battleground script template in the github are so basic and are lacking a lot of modern features ...
×
×
  • Create New...