Jump to content

AnnieRuru

Members
  • Posts

    2044
  • Joined

  • Last visited

  • Days Won

    51

Community Answers

  1. AnnieRuru's post in A, b and c betting game was marked as the answer   
    http://rathena.org/board/topic/90717-r-color-game-machine/?p=236736
     
    not sure how many "randomize chance" script I've been done
    but this is one of them I wrote just recently
  2. AnnieRuru's post in MY PVP WARPER IS NOT WORKING PROPERLY :( was marked as the answer   
    your script is working fine that I couldn't able to bring berry into your nopotion pvp room
    though, you should know that player can still bypass your system if they put the items into cart (merchant/alchemist/blacksmith)
    so its better to restrict them again with db\re\item_noequip.txt
  3. AnnieRuru's post in Mvp Rank was marked as the answer   
    euphy way's of using SQL syntax is unoptimized
    http://rathena.org/board/topic/90971-euphys-mvp-ladder-bug-npc-hides/?p=237993
    try this

    /* alter table `char` add `mvp_kill` int(11) unsigned not null default 0 after unban_time, add key (`mvp_kill`); */ prontera,148,170,6 script MVP Ladder 891,{ mes "[MVP Ladder]"; mes "Hello!"; mes "What are you doing here?"; next; switch(select("Check rankings.:My stats.:Nothing...")) { case 1: mes "[MVP Ladder]"; .@nb = query_sql( "select name, mvp_kill from `char` where mvp_kill > 0 order by mvp_kill desc limit 20", .@name$, .@value ); if ( !.@nb ) mes "The rankings are empty."; else for ( .@i = 0; .@i < .@nb; .@i++ ) mes "["+( .@i +1 )+"] "+ .@name$[.@i] +" ~ "+ .@value[.@i] +" kills"; close; case 2: mes "[MVP Ladder]"; query_sql "select mvp_kill from `char` where char_id = "+ getcharid(0), .@value; mes "You have killed "+( ( .@value )?"^0055FF"+ .@value :"no" )+"^000000 MVP"+( ( .@value == 1)? "." : "s." ); close; default: } close; OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { query_sql "update `char` set mvp_kill = mvp_kill + 1 where char_id = "+ getcharid(0); query_sql "select mvp_kill from `char` where char_id = "+ getcharid(0), .@value; dispbottom "~ You've killed "+ .@value +" MVP"+( ( .@value == 1 )? "" : "s" )+". ~"; specialeffect2 EF_HEAL2; } end; }EDIT :http://rathena.org/board/topic/66423-mvp-rank/?p=178037
    lol ... totally forgotten I already made another one
    same script, same method even
  4. AnnieRuru's post in what is the script for this effect help? was marked as the answer   
    if ( readparam(bVit) >= 255 ) bonus bMaxHP, 102000;
    else bonus bMaxHP,readparam(bVit)*400;
  5. AnnieRuru's post in Help With Auto Banned Over Status was marked as the answer   
    initnpctimer is use to run a timer on npc side
    if you want to run on player, you can try attachnpctimer
    but honestly .. for some reason I don't like using npctimer ... I prefer sleep

    - script kdjhfksjf -1,{ OnPCLoginEvent: while (1) { for ( .@i = 13; .@i <= 18; .@i++ ) { if ( readparam( .@i ) > 255 ) { mes "You have overstat ..."; sleep2 1000; atcommand "@block "+ strcharinfo(0); end; } } sleep2 1000 * 60; } end; // shouldn't reach }
  6. AnnieRuru's post in Class Specialization by Euphy was marked as the answer   
    hmm ... the idea of this script is nice ... especially the names of the job
    remove this line
    set BaseLevel,1;
    set StatusPoint,100;
    change into
    set StatusPoint, StatusPoint + 100;
    edit: btw you should know that you should set this to no

  7. AnnieRuru's post in Ticket to Rental item was marked as the answer   
    @Kido has actually tried to script this, and asked for my support in PM
    but his script is made too long with just the *menu script command

    I think this is why most scripters turn away because many people here still couldn't utilize advance scripting technique
    and I also noticed this extending rental item feature ... which have to use getinventorylist command
    makes me wants to dig this in myself
     
    I lost count of how many techniques I used inside


    EDIT: wait, accessory and god items has different rate

    ok
    prontera,150,180,5 script kjdhfksj 100,{ mes "what do you want?"; next; if ( select ( "Gears", "Extend my items" ) == 1 ) { mes "what item you want"; next; .@category_select = select ( "Accessory", "Lower Gears", "Mid Gears", "Head Gears", "Godly Gears" ); mes "what item you want"; next; if ( .@category_select != 5 ) .@id_select = select( getd( "."+ .category$[ .@category_select ] +"_id_menu$" ) ) -1; else .@id_select = select( .god_id_menu$ ) -1; mes "how many days"; next; .@days = select( .day_menu$ ); if ( countitem( .rentitem ) < .@days ) { mes "sorry insufficient ticket!"; close; } mes "here's you're item!"; if ( .@category_select == 1 || .@category_select == 5 ) delitem .rentitem, .@days *2; else delitem .rentitem, .@days; if ( .@category_select != 5 ) rentitem getd( "."+ .category$[ .@category_select ] +"_id_start" ) + .@id_select, 60*60*24* .@days; else rentitem .god_id[ .@id_select ], 60*60*24* .@days; } else { getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( compare( .id_compare$, "#"+ @inventorylist_id[.@i] +"#" ) ) { .@item_id[.@c] = @inventorylist_id[.@i]; .@expire[.@c] = @inventorylist_expire[.@i]; .@menu$ = .@menu$ + getitemname( @inventorylist_id[.@i] ) +":"; .@c++; } } if ( !.@c ) { mes "there is no rental item in your inventory"; close; } mes "which item"; next; .@s = select( .@menu$ ) -1; if ( countitem( .@item_id[.@s] ) >= 2 ) { mes "there are more than 1 of "+ getitemname( .@item_id[.@s] ) +" in your inventory. Make sure there is only 1 of them in your inventory."; close; } mes "how many days"; next; .@days = select( .day_menu$ ); if ( countitem( .rentitem ) < .@days ) { mes "sorry insufficient ticket!"; close; } mes "here's you're item!"; if ( .@item_id[.@s] >= 8000 && .@item_id[.@s] < 9000 ) delitem .rentitem, .@days; else delitem .rentitem, .@days *2; delitem .@item_id[.@s], 1; rentitem .@item_id[.@s], .@expire[.@s] - gettimetick(2) + 60*60*24* .@days; close; } close; OnInit: setarray .category$[1], "accessory", "lower", "mid", "head"; for ( .@i = 1; .@i <= 10; .@i++ ) .day_menu$ = .day_menu$ + .@i +":"; .id_compare$ = "#"; set .rentitem, 24042; // itemID to rent // Accessory items .accessory_id_start = 20000; .accessory_id_end = 20005; for ( .@i = .accessory_id_start; .@i <= .accessory_id_end; .@i++ ) { .accessory_id_menu$ = .accessory_id_menu$ + getitemname( .@i ) +":"; .id_compare$ = .id_compare$ + .@i +"#"; } // Lower Gears .lower_id_start = 8000; .lower_id_end = 8021; for ( .@i = .lower_id_start; .@i <= .lower_id_end; .@i++ ) { .lower_id_menu$ = .lower_id_menu$ + getitemname( .@i ) +":"; .id_compare$ = .id_compare$ + .@i +"#"; } // Mid Gears .mid_id_start = 8022; .mid_id_end = 8036; for ( .@i = .mid_id_start; .@i <= .mid_id_end; .@i++ ) { .mid_id_menu$ = .mid_id_menu$ + getitemname( .@i ) +":"; .id_compare$ = .id_compare$ + .@i +"#"; } // Head Gears .head_id_start = 8037; .head_id_end = 8059; for ( .@i = .head_id_start; .@i <= .head_id_end; .@i++ ) { .head_id_menu$ = .head_id_menu$ + getitemname( .@i ) +":"; .id_compare$ = .id_compare$ + .@i +"#"; } // Godly Item IDs setarray .god_id, 2629, 2410; .@size = getarraysize( .god_id ); for ( .@i = 0; .@i < .@size; .@i++ ) { .god_id_menu$ = .god_id_menu$ + getitemname( .god_id[.@i] ) +":"; .id_compare$ = .id_compare$ + .god_id[.@i] +"#"; } end; }
    EDIT for below:
    at least you have tried ~   
  8. AnnieRuru's post in Exchanger Script ( Refined Equipment to Item ) was marked as the answer   
    prontera,150,180,5 script kjdhfskdfjs 100,{ if ( countitem2( "Cotton_Shirt", 1,7,0, 0,0,0,0 ) ) {
    delitem2 "Cotton_Shirt", 1,1,7,0, 0,0,0,0;
    getitem 7866, 7;
    end;
    }
    mes "you don't have a cotton shirt +7";
    close;
    }
  9. AnnieRuru's post in Help with waiting room code was marked as the answer   
    prontera,156,185,5 script kjhdfkjshf 100,{ end; OnInit: sleep 1; // ..... for some stupid reason, when logging out needs to sleep <.< query_sql "select count(1) from login left join `char` on `char`.account_id = login.account_id where group_id > 0 and online = 1", .@count; waitingroom .@count +"", 0; end; OnPCLoginEvent: OnPCLogoutEvent: if ( getgmlevel() >= 1 ) { delwaitingroom strnpcinfo(0); goto OnInit; } end; }EDIT:hmm ... wait, you are not using query_sql ... let's see ....
    ok done

    prontera,156,185,5 script kjhdfkjshf 100,{ end; OnInit: if ( !getusers(1) ) // preserve through @reloadscript $gm_online_count = 0; waitingroom $gm_online_count +"", 0; // debugmes $gm_online_count +" "+ getusers(1); end; OnPCLoginEvent: if ( getgmlevel() >= 1 ) { $gm_online_count++; delwaitingroom; waitingroom $gm_online_count +"", 0; } end; OnPCLogoutEvent: if ( getgmlevel() >= 1 ) { $gm_online_count--; delwaitingroom; waitingroom $gm_online_count +"", 0; } end; }
  10. AnnieRuru's post in VIP System Small Modification was marked as the answer   
    I kinda remember your name ... in eathena ...
    so I do some service for ya
     
    SC_EXPBOOST    257
    SC_ITEMBOOST    258
     
    sc_start sc_expboost ....
    I'm sure you can figure out the rest
  11. AnnieRuru's post in Im using Annie KOE Script but need some modifications was marked as the answer   
    hmm ... now I read this script seriously ... yeah it miss a guildlock mapflag ... they can put a lot of characters in, and invite/kick guild members inside the map ...

    ... yeah =/ should be gvgon/gvgoff script command, not by a mapflag ok I rewrite this script a little
    koe_0.2.txt
    koe_0.2.patch
  12. AnnieRuru's post in need help auto jobchanger at multi in 1 npc was marked as the answer   
    sry wrong info,
    I was just about to edit my post but you posted a reply =/
    OnPCBaseLvUpEvent:
    I so seldom use this label, that I almost didn't notice it at all
    it triggers when a player has level up from getting exp from a monster, *getexp script command or set baseexp, baseexp + xxx;
    now it comes to me that the reason why in this script wants to use this label,
    is because the player might get killed while talking to an invisible npc triggered by this label while farming mobs
    perhaps a better way to tackle this is with setoption
     

    atcommand strcharinfo(0)+":@monsterignore"; addtimer 1000, strnpcinfo(3)+"::OnLeave";all these change into
    setoption 0x40, 1; addtimer 1000, strnpcinfo(3)+"::OnLeave";and
    OnLeave: atcommand strcharinfo(0)+":@monsterignore";change into
    OnLeave: setoption 0x40, 0;
  13. AnnieRuru's post in LMS Event Problem was marked as the answer   
    OnEnable: pvpoff "guild_vs5"; // <-- add this mapannounce "guild_vs5","Mr. Manager:The Last Man Standing Event will start shortly",0;seriously this script is very unoptimizedwhy I can spot another label to start this event ?

    - script LMS -1,{ goto startlmsevent; startlmsevent: pvpoff "guild_vs5"; announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0;funny code here, its like this part has been left out
  14. AnnieRuru's post in R>Santa Poring Summoner was marked as the answer   
    - script asdf -1,{ OnMinute00:
    if ( gettime(3) % 2 ) end;
    announce "summoning start", bc_all;
    killmonster "prontera", strnpcinfo(0)+"::Onnormal";
    killmonster "prontera", strnpcinfo(0)+"::Onspecial";
    .count = 30;
    monster "prontera", 0,0, "--ja--", 1062,70, strnpcinfo(0)+"::Onnormal";
    monster "prontera", 0,0, "--ja--", 1062,30, strnpcinfo(0)+"::Onspecial";
    end;
    Onnormal:
    getitem 9524, 1;
    end;
    Onspecial:
    getitem 7179, 1;
    .count--;
    if ( .count )
    announce "special poring left "+ .count, bc_map;
    else
    announce "all special poring killed", bc_map;
    end;
    }
  15. AnnieRuru's post in password for all commands was marked as the answer   
    damn ... 2 hours on this single topic
    my source coding knowledge totally gone
     

    src/map/atcommand.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a5232f4..0a475b8 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9750,6 +9750,19 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if( sscanf(atcmd_msg, "%99s %99[^\n]", command, params) < 2 ) params[0] = '\0'; + { + char aaa[100], bbb[100]; + if ( sscanf( params, "%30s %99[^\n]", aaa, bbb ) != 2 ) { + clif_displaymessage( fd, "Input the password !" ); + return false; + } + if ( strcmp( aaa, "qwer" ) ) { + clif_displaymessage( fd, "Wrong password" ); + return false; + } + strcpy( params, bbb ); + } + // @commands (script based) if((type == 1 || type == 3) && atcmd_binding_count > 0) { struct atcmd_binding_data * binding; change the qwer into your desire passwordalthough seriously, you should've limit your GM to use which command by setting in rathena\conf\groups.conf
    EDIT: I made this for password into all command <.<
    you mean just 1 single command ?
  16. AnnieRuru's post in SQL error was marked as the answer   
    I think its opposite
    she might just probably switch eamod into rathena
    because rathena doesn't have playtime column
    run this

    alter table `char` drop column playtime;I believe this should belongs to server support =/
  17. AnnieRuru's post in N> Npc who change the job sprite was marked as the answer   
    http://www.eathena.ws/board/index.php?s=&showtopic=276237&view=findpost&p=1515489
    http://www.eathena.ws/board/index.php?s=&showtopic=274985&view=findpost&p=1508621
  18. AnnieRuru's post in Annieruru Custom BG was marked as the answer   
    ahhh ...
    I forgotten that you have modification on that script
    because I copy pasted from my old script =/
    [paste=me3ys2ndhgc]
  19. AnnieRuru's post in GM Staff online status was marked as the answer   
    emistry is having his holiday
    so I do
     

    prontera,155,171,5 script GM Online Lists 436,{ mes "Example RO GM list : "+( .admincount + .gmcount ); mes "-----------------------------"; for ( .@i = 0; .@i < .admincount; .@i++ ) { mes "Admin : "+ .admin$[.@i]; mes "Status : "+( ( isloggedin( getcharid( 3, .admin$[.@i] ) ) )? ( ( checkidle( .admin$[.@i] ) > .idletime )? "Idle" : "Online" ) : "Offline" ); query_sql "select date_format( lastlogin , '%l.%i%p %e/%c/%Y' ) from login right join `char` on `char`.account_id = login.account_id where `char`.name = '"+ escape_sql( .admin$[.@i] ) +"'", .@time$; mes "Last Login: "+ .@time$; mes "-----------------------------"; } for ( .@i = 0; .@i < .gmcount; .@i++ ) { mes "GM : "+ .gm$[.@i]; mes "Status : "+( ( isloggedin( getcharid( 3, .gm$[.@i] ) ) )? ( ( checkidle( .gm$[.@i] ) > .idletime )? "Idle" : "Online" ) : "Offline" ); query_sql "select date_format( lastlogin , '%l.%i%p %e/%c/%Y' ) from login right join `char` on `char`.account_id = login.account_id where `char`.name = '"+ escape_sql( .gm$[.@i] ) +"'", .@time$; mes "Last Login: "+ .@time$; mes "-----------------------------"; } mes gettimestr("%I:%M%p ",10) + gettime(5) + gettimestr(" %B ",15) + gettime(7); close; OnInit: .idletime = 60; // idle for 60 seconds = idle status setarray .admin$, "AnnieRuru"; setarray .gm$, "EnnyRuru", "KinoRuru"; .admincount = getarraysize( .admin$ ); .gmcount = getarraysize( .gm$ ); end; }the script itself isn't hard, but for some reason, I took lots of time to figure which %? to use in date_format <.<
  20. AnnieRuru's post in R> Color Game Machine was marked as the answer   
    prontera,150,188,5 script Color Machine 100,{ cutin "color_machine_0", 2; if ( countitem(7227) < 5 ) { mes "you must have at least 5 TCG to play"; close2; cutin "", 255; end; } mes "how many TCG you want to play ?"; mes "minimum to bet = 5"; next; input .@input, 5, countitem(7227); mes "betting = "+ .@input; mes "choose a color"; next; .@s = select( "Red", "Green", "Blue", "Yellow" ) -1; .@r = rand(4); .@loop = .@r + 4*5 +1; // 4 choices * 10 loops for ( .@i = 0; .@i < .@loop; .@i++ ) { cutin "color_machine_"+( .@i%4 +1 ), 2; sleep2 250; } if ( .@s == .@r ) { mes "Correct !"; getitem 7227, .@input; } else { mes "Wrong"; delitem 7227, .@input; } close2; cutin "", 255; end; }I got a pm regarding this topic, so I want to say somethingin this script request section we supporters only write the system
    if you want this npc looks more interesting, you have to learn how to edit the dialog
    like add mes,next,progressbar ... these stuff you have to do it yourself
    if you edited this script and its not working, feel free to post your edited script in script support section
  21. AnnieRuru's post in how to check if your party is near you with 1cell was marked as the answer   
    abusing addrid
     

    // callfunc "F_partynear", <distance>; function script F_partynear { .count = 0; .@origin = getcharid(3); .distance = getarg(0); getmapxy .map$, .x, .y, 0; addrid 2,0, getcharid(1); getmapxy .@map$, .@x, .@y, 0; if ( .map$ == .@map$ && distance( .@x, .@y, .x, .y ) <= .distance ) .count++; if ( getcharid(3) != .@origin ) end; return .count -1; // -1 because it also attach the orignal rid } prontera,155,188,5 script kjdhfkjsdf 100,{ dispbottom callfunc( "F_partynear", 2 ) +""; end; }
  22. AnnieRuru's post in Restrict Job Below 3rd Job. was marked as the answer   
    http://www.eathena.ws/board/index.php?s=&showtopic=269996&view=findpost&p=1479378
    dammit ... I should've search around a little bit before posting
    it should be

    if ( upper & 4 == 0 ) { mes "3rd job only"; close; }
  23. AnnieRuru's post in R>Script that makes commands was marked as the answer   
    these 2 definitely needs source coding - script Haze 100,{ Onitemrain: .@itemid = atoi( .@atcmd_parameters$ ); if ( getitemname( .@itemid ) == "null" ) { message strcharinfo(0), "Invalid Item ID"; end; } .@area = getbattleflag("area_size"); getmapxy .@map$, .@x, .@y, 0; while ( .@i < 100 ) { makeitem .@itemid, 1, .@map$, .@x + rand( -.@area, .@area ), .@y + rand( -.@area, .@area ); .@i++; } end; OnInit: bindatcmd "itemrain", strnpcinfo(0) +"::Onitemrain", 60,100; end; } - script Haze 100,{ Onorder: if ( !getcharid(2) ) end; if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { message strcharinfo(0), "Only guild master can use this command"; end; } .msg$ = .@atcmd_parameters$; addrid 3, 0, getcharid(2); announce .msg$, bc_self; end; OnInit: bindatcmd "order", strnpcinfo(0) +"::Onorder", 0,100; end; }
  24. AnnieRuru's post in [ query_sql ] How to create a data like this was marked as the answer   
    /* create table npc_categories ( char_id int(11), categories varchar(20) ) engine = innodb; */ prontera,156,189,6 script kjdhfksdjf 100,{ mes "blah"; next; .@s = select(.menu$) -1; mes .string$[.@s]; query_sql "insert into npc_categories values ( "+ getcharid(0) +", '"+ escape_sql( .string$[.@s] ) +"' )"; close; OnInit: setarray .string$, "Jumping", "Pushing", "Hiding"; for ( .@i = 0; .@i < 3; .@i++ ) .menu$ = .menu$ + .string$[.@i] +":"; end; }start learn sql from herehttp://www.w3schools.com/sql/
  25. AnnieRuru's post in Auto Kick GM When WoE Time was marked as the answer   
    should be opposite
    if ( getgmlevel() >= 60 && getgmlevel() < 99 && ( agitcheck() || agitcheck2() ) ) { full script

    - script dkfdshfkjsd -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && getgmlevel() >= 60 && getgmlevel() < 99 && ( agitcheck() || agitcheck2() ) ) { message strcharinfo(0),"You are not allowed here"; sleep2 2000; warp "SavePoint",0,0; } end; } aldeg_cas01 mapflag loadevent aldeg_cas02 mapflag loadevent aldeg_cas03 mapflag loadevent aldeg_cas04 mapflag loadevent aldeg_cas05 mapflag loadevent gefg_cas01 mapflag loadevent gefg_cas02 mapflag loadevent gefg_cas03 mapflag loadevent gefg_cas04 mapflag loadevent gefg_cas05 mapflag loadevent payg_cas01 mapflag loadevent payg_cas02 mapflag loadevent payg_cas03 mapflag loadevent payg_cas04 mapflag loadevent payg_cas05 mapflag loadevent prtg_cas01 mapflag loadevent prtg_cas02 mapflag loadevent prtg_cas03 mapflag loadevent prtg_cas04 mapflag loadevent prtg_cas05 mapflag loadevent schg_cas01 mapflag loadevent schg_cas02 mapflag loadevent schg_cas03 mapflag loadevent schg_cas04 mapflag loadevent schg_cas05 mapflag loadevent
×
×
  • Create New...