-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by AnnieRuru
-
wow !! makes me remember back someone else actually did similar stuffs back then http://www.eathena.ws/board/index.php?showtopic=156843 but that site went down though yeah its better to add the feature directly into the forum ok, as I expected, from my past experienced, 1. post#14 in eathena forum [paste=53zbub9qama] this paste can show chinese letter correctly but when click on the TEXT button to view raw some funny letters come out so is this compatible with international forum section ? EDITED: but the [Download] seems working fine so ... I think can leave this bug out 2. post#19 comment block aren't colored to green [paste=7ug16w5fda1] 3. can set [athena] script language as default ? 4. why can't I delete my own paste ? 5. Paste title: Type: Password: these 3 fields, password and paste title are optional issit possible to add another field Topic ID/URL: we can paste the url of the topic inside this field (optional) and besides [Text] [Download] <-- add this button ?
-
add this code right after your fishing script header if ( !rand(100) ) { doevent "Anti Bot::OnCheck"; end; } and change Check: label into OnCheck: along with goto Check; into goto OnCheck;
-
hmm ... didn't know rathena has updated a bit ... much ... - shop market2#hidden -1,501:1000 prontera,156,172,5 script market 100,{ dispbottom "You currently have "+ countitem(.currency) +" "+ getitemname(.currency); callshop .shopname$, 1; end; OnInit: function addshopitem { npcshopdelitem .shopname$, 501; .@count = getargcount(); for ( .@i = 0; .@i < .@count; .@i++ ) { if ( .@i % 2 == 0 ) .itemid[ .@i /2 ] = getarg( .@i ); else { .itemcost[ .@i /2 ] = getarg( .@i ); npcshopadditem .shopname$, .itemid[ .@i /2 ], getarg( .@i ); } } } // ----- Configuration ------ .shopname$ = "market2#hidden"; // shop name that match the 1st line in this script .currency = 675; // item used for currency addshopitem // adds shop items here 9001,10, 9002,20, 9003,30, 9004,40, 9005,50; // ------------------------- .itemsize = getarraysize( .itemid ); for ( .@i = 0; .@i < .itemsize; .@i++ ) setd ".item"+ .itemid[.@i] +"cost", .itemcost[.@i]; npcshopattach .shopname$; end; OnBuyItem: if ( !@bought_quantity ) end; .@size = getarraysize( @bought_nameid ); for ( .@i = 0; .@i < .@size; .@i++ ) .@itemcost = .@itemcost + getd( ".item"+ @bought_nameid[.@i] +"cost" ); if ( .@itemcost > countitem(.currency) ) { mes "you don't have enough "+ getitemname(.currency); close; } cleararray @bought_quantity[0],1, getarraysize( @bought_quantity ); if ( !checkweight2( @bought_nameid, @bought_quantity ) ) { mes "you can't carry all these items !"; close; } delitem .currency, .@itemcost; for ( .@i = 0; .@i < .@size; .@i++ ) { getitem @bought_nameid[.@i], 1; sleep2 1; } end; }
-
1. if ($started == 1) donpcevent "KingOfHill::Onregister";comment this linebut this edit will force the player to register from prontera town 2. sleep 10000; announce "Enter the portal before it closes",0; initnpctimer; close; // <-- change to end;
-
prontera,153,178,4 script GvGPvP Watcher 414,{ if ( select ( "go to pvp", "spectator" ) == 1 ) warp "pvp_y_2-1",0,0; else { pcblockchat getcharid(3), 1; pcblockattack getcharid(3), 1; setoption 0x40, 1; warp "pvp_y_2-1",0,0; } end; OnPCLogoutEvent: setoption 0x40, 0; end; } pvp_y_2-1 mapflag pvp pcblockattack_pcblockchat_20140107.patch
-
Requesting Exchanger and refiner.
AnnieRuru replied to AllHailToTheKing's question in Script Requests
http://www.eathena.ws/board/index.php?s=&showtopic=179885&view=findpost&p=989158 let's see ... prontera,150,190,6 script Refiner 899,{ if ( countitem(.itemid) < 10 ) { mes "You don't have item"; close; } for ( .@i = 0; .@i < 3; .@i++ ) .@menu$ = .@menu$ +( ( getequipisequiped( .loc[.@i] ) )? getitemname( getequipid( .loc[.@i] ) ) : "<not equipped>" )+":"; .@s = select( .@menu$ ) -1; // if ( !getequipisenableref( .loc[.@i] ) ) { // mes "this item cannot be refine"; // close; // } if ( getequiprefinerycnt( .loc[.@s] ) == 10 ) { mes "the item already at max refine"; close; } delitem .itemid, 10; while ( getequiprefinerycnt( .loc[.@s] ) < 10 ) successrefitem .loc[.@s]; close; OnInit: .itemid = 512; // use which item to refine +10 setarray .loc, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW; end; } prontera,150,190,6 script sdfsdfsdfds 899,{ if ( countitem(512) >= 10 ) { delitem 512, 10; getitem 14232, 1; } end; } -
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
-
its better to use constant to debug the script easier and the intimacy is actually >900 http://rathena.org/board/topic/91000-make-this-query-check-on-1000-pet-intimacy/?p=237899 an updated script is already provided over there in post#2
-
on post#4 ? bst_delay.patch
-
http://rathena.org/board/topic/81302-im-using-annie-koe-script-but-need-some-modifications/?p=237227 apply that patch should work if ( battle_getcurrentskill(src) > 0 ) return 0;this will make ALL SKILLS (santuary included) will be disable to use skill on this emperium
-
src/map/atcommand.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index cd090a5..66c229e 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7899,6 +7899,13 @@ static int atcommand_mutearea_sub(struct block_list *bl,va_list ap) return 0; } + if ( ( target_sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { + char aaa[255]; + sprintf( aaa, "You can't invite %s into @duel because %s is a bard/dancer", target_sd->status.name, ( target_sd->status.sex )? "he" : "she" ); + clif_displaymessage( fd, aaa ); + return 0; + } + if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) { // "Duel: Player already in duel." clif_displaymessage(fd, msg_txt(sd,353)); @@ -7941,6 +7948,11 @@ static int atcommand_mutearea_sub(struct block_list *bl,va_list ap) return 0; } + if ( ( sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { + clif_displaymessage( fd, "You can't @duel because you are a bard/dancer" ); + return 0; + } + if( message[0] ) { if(sscanf(message, "%d", &maxpl) >= 1) { if(maxpl < 2 || maxpl > 65535) { @@ -7958,6 +7970,12 @@ static int atcommand_mutearea_sub(struct block_list *bl,va_list ap) clif_displaymessage(fd, msg_txt(sd,353)); // "Duel: Player already in duel." return 0; } + else if ( ( target_sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { + char aaa[255]; + sprintf( aaa, "You can't invite %s into @duel because %s is a bard/dancer", target_sd->status.name, ( target_sd->status.sex )? "he" : "she" ); + clif_displaymessage( fd, aaa ); + return 0; + } duel_invite(newduel, sd, target_sd); clif_displaymessage(fd, msg_txt(sd,354)); // "Duel: Invitation has been sent." } edit: the patch file doesn't make sense here these 2 functions that I've edit ACMD_FUNC(invite) { unsigned int did = sd->duel_group; struct map_session_data *target_sd = map_nick2sd((char *)message); if(did == 0) { // "Duel: @invite without @duel." clif_displaymessage(fd, msg_txt(sd,350)); return 0; } if(duel_list[did].max_players_limit > 0 && duel_list[did].members_count >= duel_list[did].max_players_limit) { // "Duel: Limit of players is reached." clif_displaymessage(fd, msg_txt(sd,351)); return 0; } if(target_sd == NULL) { // "Duel: Player not found." clif_displaymessage(fd, msg_txt(sd,352)); return 0; } if ( ( target_sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { char aaa[255]; sprintf( aaa, "You can't invite %s into @duel because %s is a bard/dancer", target_sd->status.name, ( target_sd->status.sex )? "he" : "she" ); clif_displaymessage( fd, aaa ); return 0; } if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) { // "Duel: Player already in duel." clif_displaymessage(fd, msg_txt(sd,353)); return 0; } if(battle_config.duel_only_on_same_map && target_sd->bl.m != sd->bl.m) { sprintf(atcmd_output, msg_txt(sd,364), message); clif_displaymessage(fd, atcmd_output); return 0; } duel_invite(did, sd, target_sd); // "Duel: Invitation has been sent." clif_displaymessage(fd, msg_txt(sd,354)); return 0; } ACMD_FUNC(duel) { unsigned int maxpl = 0; if(sd->duel_group > 0) { duel_showinfo(sd->duel_group, sd); return 0; } if(sd->duel_invite > 0) { // "Duel: @duel without @reject." clif_displaymessage(fd, msg_txt(sd,355)); return 0; } if(!duel_checktime(sd)) { char output[CHAT_SIZE_MAX]; // "Duel: You can take part in duel only one time per %d minutes." sprintf(output, msg_txt(sd,356), battle_config.duel_time_interval); clif_displaymessage(fd, output); return 0; } if ( ( sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { clif_displaymessage( fd, "You can't @duel because you are a bard/dancer" ); return 0; } if( message[0] ) { if(sscanf(message, "%d", &maxpl) >= 1) { if(maxpl < 2 || maxpl > 65535) { clif_displaymessage(fd, msg_txt(sd,357)); // "Duel: Invalid value." return 0; } duel_create(sd, maxpl); } else { struct map_session_data *target_sd; target_sd = map_nick2sd((char *)message); if(target_sd != NULL) { unsigned int newduel; if((newduel = duel_create(sd, 2)) != -1) { if(target_sd->duel_group > 0 || target_sd->duel_invite > 0) { clif_displaymessage(fd, msg_txt(sd,353)); // "Duel: Player already in duel." return 0; } else if ( ( target_sd->class_&MAPID_UPPERMASK ) == MAPID_BARDDANCER ) { char aaa[255]; sprintf( aaa, "You can't invite %s into @duel because %s is a bard/dancer", target_sd->status.name, ( target_sd->status.sex )? "he" : "she" ); clif_displaymessage( fd, aaa ); return 0; } duel_invite(newduel, sd, target_sd); clif_displaymessage(fd, msg_txt(sd,354)); // "Duel: Invitation has been sent." } } else { // "Duel: Player not found." clif_displaymessage(fd, msg_txt(sd,352)); return 0; } } } else duel_create(sd, 0); return 0; }
-
http://www.eathena.ws/board/index.php?showtopic=239232 don't use `guild_member` table this table updates periodically its better to use `char` table, more accurate - script kdjfskdjfhs -1,{ OnAgitEnd: switch ( gettime(4) ) { case 0: .@gid = getcastledata("prtg_cas03",1); break; case 2: .@gid = getcastledata("prtg_cas01",1); break; case 4: .@gid = getcastledata("prtg_cas02",1); break; default: end; } .@nb = query_sql( "select account_id from `char` where guild_id = "+ .@gid +" and online = 1", .@aid ); for ( .@i = 0; .@i < .@nb; .@i++ ) { attachrid .@aid[.@i]; getitem 7539,15; dispbottom "You received 15 Poring Coins for his victory in the War of Emperium."; // google translator } end; }
-
if (@totalcost > countitem(.Currency[@s])) dispbottom "You don't have enough "+getitemname(.Currency[@s])+"."; else { set .@i,0; while (.@i < getarraysize(@bought_nameid)) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"."; set .@i, .@i+1; } delitem .Currency[@s], @totalcost; }change into if (@totalcost > countitem(.Currency[@s])) dispbottom "You don't have enough "+getitemname(.Currency[@s])+"."; else if ( !checkweight2(@bought_nameid,@bought_quantity) ) { dispbottom "You can't make this purchase because you'll be overweight !"; end; } else { set .@i,0; while (.@i < getarraysize(@bought_nameid)) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"."; set .@i, .@i+1; } delitem .Currency[@s], @totalcost; }
-
MY PVP WARPER IS NOT WORKING PROPERLY :(
AnnieRuru replied to Renji Abarai's question in Scripting Support
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 -
change } else if (isloggedin(.@aid[.@j])) { for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@aid[.@j]; message rid2name(.@aid[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; }into } else if (isloggedin(.@aid[.@j])) { if ( checkvending( rid2name( .@aid[.@j] ) ) || checkchatting( rid2name( .@aid[.@j] ) ) ) continue; for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@aid[.@j]; message rid2name(.@aid[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; }
-
Is there a way to prevent use on a specific map?
AnnieRuru replied to Peopleperson49's question in Scripting Support
why not just create a new item ID ? if use on an event script, usually we create a new item ID and limited that item with \db\ files that item is only usable in the map (by modifying script field of that ID) and place limitations with item_noequip and such otherwise, share what's the idea of the script you're working on I never write a script that needs to specifically makes an existing item id and make it only work in 1 event script ... -
script request section ... oh yeah ... I'm guessing you are using this gold room script /* alter table `char` add `gold_rank` int(11) unsigned default 0 after unban_time, add index (gold_rank); */ prontera,155,180,5 script kjfhsdkfjhs 100,{ .@nb = query_sql( "select name, gold_rank from `char` where gold_rank > 0 order by gold_rank desc limit 2", .@name$, .@gold ); if ( !.@nb ) { mes "no ranking yet"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$ +" killed "+ .@gold +" Golden Peco"; close; OnNPCKillEvent: if ( strcharinfo(3) == "ordeal_1-2" && killedrid == 1369 ) query_sql "update `char` set gold_rank = gold_rank +1 where char_id = "+ getcharid(0); end; }
-
I just tested in latest clean rathena, it should be working and this should be working in eathena, at least what tells me since I have been making source code since I was still in eathena forum these 2 functions belongs to atcommand.c ACMD_FUNC(bst) ACMD_DEF(bst), and bst_delay goes inside map_session_data function inside pc.h file ... come on have some common sense ! @Blue Jem I don't understand a single bit when you just say "not working" @Psy fix ... fix what ? I don't even know what kind of error you are getting
-
at least show your pvp/gvg script ...
-
mes @woe2; change into mes @woe2 +""; mes @donate_total; change into mes @donate_total +"";
-
a more practical method should be asking the player to trade how many golds he want change the exchange: label into like this exchange: mes "[Gold Room Warperer]"; mes "Hmm...let me see"; mes "You have " +gold+ "."; if (gold == 0) goto nogold; mes "how many you want to retrieve ?"; next; input .@tmp, 1, gold; if (checkweight(969,.@tmp) == 0) goto L_OverWeight; getitem 969, .@tmp; set gold, gold - .@tmp; emotion e_gg; end;
-
open your pc.h file make sure the int bst_delay; is inside the struct map_session_data struct map_session_data { .... int bst_delay; };I think you add it in manually but you put that line inside wrong function
-
imo ... script optimization actually means make the emulator process at the least time as possible http://userscripts.org/guides/8 in this terms, kido's script actually already optimized what you actually did is making the script engine runs more script commands, thus process slower there are a few stuffs you'll learn that, for example getarraysize script command actually loops all the values in that array ... for-loop runs 3 goto count ... ugliest loop in rathena script engine ... if you can read source ... try imagine if your script convert into source language ... I think you mean, making the script more user friendly =D so people can just adjust the value from the setarray
-
prontera,155,188,5 script jsfkdsfhsk 100,{ mes "blah"; next; switch ( select ( "player ranking", "mvp killed", "last mvp killed" ) ) { case 1: .@nb = query_sql( "select kill_char_id as aaa, ( select name from `char` where char_id = aaa ), count(1) as bbb from mvplog group by kill_char_id order by bbb desc limit 20", .@cid, .@name$, .@count ); if ( !.@nb ) { mes "no entry"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes ( .@i +1 )+". "+ .@name$[.@i] +" -> "+ .@count[.@i] +" points"; close; case 2: .@nb = query_sql( "select monster_id as aaa, ( select kname from mob_db_re where id = aaa ), count(1) from mvplog group by monster_id", .@mobid, .@name$, .@count ); if ( !.@nb ) { mes "no entry"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" : "+ .@count[.@i] +" times"; close; case 3: .@nb = query_sql( "select monster_id as aaa, ( select kname from mob_db_re where id = aaa ), max(mvp_date) from mvplog group by monster_id", .@mobid, .@name$, .@date$ ); if ( !.@nb ) { mes "no entry"; close; } for ( .@i = 0; .@i < .@nb; .@i++ ) mes .@name$[.@i] +" -> "+ .@date$[.@i]; close; } close; } this part needs someone to provide an array for me x.x
-
- script atcmd_example -1,{ OnInit: bindatcmd "bs",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if ( @bst_delay + 5 > gettimetick(2) ) end; @bst_delay = gettimetick(2); announce "[Market] "+ strcharinfo(0) +" : "+ implode( .@atcmd_parameters$," " ), bc_all, 0x9999FF; end; }unfortunately ... if you don't want the announcement display at the top of the screenthere can be only display in white(normal), red(party), green(dispbottom/guild) color only the globalmes command is actually displaying normal player chat(white) and dispbottom command is actually using guild chat color