Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. AnnieRuru

    map change

    disable player from multi client and kick AFK players ? that's a frequently asked question until .... I'm sick of it I know how to block same ip address, but dunno how to block same mac address and for the AFK script //===== Hercules Script ===========================================//= AFK script//===== By: =======================================================//= AnnieRuru//===== Current Version: ==========================================//= 1.3//===== Compatible With: ==========================================//= Hercules 20140919//===== Description: ==============================================//= warp AFK players in BG maps to SavePoint, leave current team//===== Topic =====================================================//= http://www.eathena.ws/board/index.php?showtopic=272411//===== Additional Comments: ======================================//= repost this script for hercules//=================================================================- script afk_script -1,{// ConfigOnInit: .sleeploop = 2000; // every 1 second .afk = 4; // loop 180 times of 1 second = 3 minutes to execute setarray .@map$, "bat_a01", "bat_a02", "bat_b01", "bat_b02", "bat_c01", "bat_c02", "bat_c03"; // battlegrounds .@size = getarraysize( .@map$ ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .@map$[.@i], mf_loadevent; .map$ = ":"+ implode( .@map$, ":" ) +":"; .idle = .sleeploop * .afk / 1000; end;// what to do when triggeredL_trigger:// dispbottom "you have afk for "+ .idle +" seconds"; if ( getcharid(4) ) bg_leave; warp "SavePoint", 0,0; end;// functionOnPCLoadMapEvent: while ( true ) { if ( compare( .map$, ":"+ strcharinfo(3) +":" ) ) { if ( checkidle() >= .idle ) goto L_trigger;// dispbottom "you have afk for "+ checkidle() +" seconds"; sleep2 .sleeploop; } else break; } end;}wanted to make a release topic, but suddenly realize Ind almost finish the battleground queue systemmight as well use his ... when ready
  2. http://herc.ws/board/topic/6831-mac-address-dectection/ unfortunately, current hexed client has no known way of sending mac address I tried the patch, but my hexed client doesn't send any mac address
  3. dirty methodhttp://upaste.me/9e3531 can you tell how you compile your server ? [info]: Compiled with Microsoft Visual C++ 2010 (v1600)
  4. I remember I saw people already solved this on rathena forum.... here it is http://rathena.org/board/topic/90978-npc-hide-and-progressbar-q/?p=238295 http://rathena.org/board/topic/93307-npc-visibility-variable-help/?hl=clif_getareachar_unit EDIT : .... just from reading the code, I think its not working ... try and see ?
  5. AnnieRuru

    NPC Buy/Sell

    LMAO !I am sure you know when I started learn src edit, its from your topic (if eathena still up I can post the link haha) I remember its ... *getdir script command anyway, same as you, I also tried this once during eathena, and tried 1 more time 2~3 years back when during rathena ... same result because clif_selllist use the information directly from your inventory if you want to display a signed item or carded item using clif_sellist, then you also need to have that exact same item in your inventory the code looks exactly similar to getinventorylist loop all items in inventory, then check itemID + refine + attribute + identify + card0~3 if all condition same, then can show, otherwise, cannot show so I did a trick gives the signed item to the player (which display 'you get xxxx item' as dispbottom(blue) ) then open the shop, it works if the player doesn't buy, delitem then close the shop there are few problem with this namely, checkweight, max inventory size, risk item drop on the floor ... and many the player might also thought they got the item, but its actually just for show I remember I also thought of another method which is using auction menu since auction allows to display signed/carded item as selling item, it might be just as possible to do this but not so sure now because at that time I was using 20100730 hexed client, now the auction has been removed in latest client
  6. same as yours, also same as latest hercules git (always update) totally no idea, client support or client hexing is totally not my field
  7. thanks for the reminder http://upaste.me/161989 is the *questinfo command only show with checkquest(x) == -1 intended ? https://github.com/HerculesWS/Hercules/blob/master/src/map/clif.c#L9609 because when player on the quest, I want to show where the npc is with the mini-map dot but the *questinfo only display the mini-dot when checkquest(x) == -1(not started), not 1(active)
  8. http://upaste.me/7f63cf pull request then, not me
  9. Download: 1.1 sample quest log Download: 1.1 sample daily quest these are 5 sample quests using quest log system this was actually made as a sample script inside a script support section in eathena forum original topic from eathena thanks to paradog eathena admin that makes eathena forum down, almost gonna remake everything from scratch luckily I got a few segment here and there in my old hard-disk so doesn't take too much time to write this sample Quest #1 typical talk to npc A, then npc B ... etc demonstrate how to use *checkquest Quest #2 collect item quest just checkitem with it I still don't know how to use the client to trace is the item collecting has completed or not Quest #3 kill monster quest demonstrate how to use *checkquest( x, HUNTING ) Quest #4 typical talk to npc A, then npc B ... BUT with a time limit demonstrate how to use *checkquest( x, PLAYTIME ) Quest#5 if player having this quest, player can *getitem by killing this monster see https://github.com/HerculesWS/Hercules/blob/stable/db/quest_db.conf#L45-L50 and I want to remind this is just a sample script usually make for source modification on quest log system (now is 3rd time I think ?) 2 sample script for daily system 1. Daily item giver ... although I think this should done with attendance system ... 2. Daily hunting ... self explain ... [109991] = { UI_Type = 0, group = "CHATTING", major = 4, minor = 0, title = "Tavern Helper", content = { summary = "Visit the Tavern Master", details = "Visit the Tavern Master in Prontera." }, resource = { [1] = { text = "Acolyte Trouble" }, [2] = { text = "Gemstone shortage" }, [3] = { text = "Poring Problem" }, [4] = { text = "Hand over the Artifact" }, [5] = { text = "Shining Rocker" } }, reward = { title = 991 }, score = 5 }, [109992] = { UI_Type = 1, group = "GOAL_ACHIEVE", major = 6, minor = 0, title = "Complete Daily Quest for 30 times", content = { summary = "Complete Daily Quest", details = "Complete Daily Quest for 30 times and you can earn some nice rewards!" }, resource = { [1] = { text = "Collect Daily Items 30 times", count = 30 }, [2] = { text = "Complete Daily Quest 30 times", count = 30 } }, reward = { title = 992, item = 513 }, score = 30 }, UI_TYPE - display a bar like in the daily quest screenshot - 0: in the [resource], doesn't support [count] - 1: support [count] group: - read from data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\achievement major - 1: General tab - 2: Adventure tab - 3: Battle tab - 4: Quest tab - 5: Memorial tab - 6: Feat tab
  10. its so simple that I can write this on the fly until I can cry src/map/atcommand.c | 26 ++++++++++++++++++++++++++ src/map/pc.c | 5 +++++ src/map/pc.h | 2 ++ 3 files changed, 33 insertions(+)diff --git a/src/map/atcommand.c b/src/map/atcommand.cindex b5e8fa7..af092eb 100644--- a/src/map/atcommand.c+++ b/src/map/atcommand.c@@ -9374,6 +9374,31 @@ static inline void atcmd_channel_help(int fd, const char *command, bool can_crea clif->message(fd,atcmd_output); return true; }++ACMD(drop) {+ if ( stristr( message, "on" ) ) {+ if ( sd->candrop )+ clif->message( fd, "You already turn on @drop." );+ else {+ sd->candrop = 1;+ clif->message( fd, "You are now turn ON @drop. You can drop items now." );+ }+ }+ else if ( stristr( message, "off" ) ) {+ if ( !sd->candrop )+ clif->message( fd, "You already turn off @drop" );+ else {+ sd->candrop = 0;+ clif->message( fd, "You are now turn OFF @drop. You can't drop items now." );+ }+ }+ else {+ clif->message( fd, "Syntax: @drop on|off." );+ return false;+ }+ return true;+}+ /** * Fills the reference of available commands in atcommand DBMap **/@@ -9384,6 +9409,7 @@ void atcommand_basecommands(void) { * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = {+ ACMD_DEF(drop), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto),diff --git a/src/map/pc.c b/src/map/pc.cindex 2372d31..1c0c934 100644--- a/src/map/pc.c+++ b/src/map/pc.c@@ -4123,6 +4123,11 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) return 0; //Can't drop items in nodrop mapflag maps. } + if ( !sd->candrop ) {+ clif->message( sd->fd, "You can't drop items. Type '@drop on' to allow drop items." );+ return 0;+ }+ if( !pc->candrop(sd,&sd->status.inventory[n]) ) { clif->message (sd->fd, msg_txt(263));diff --git a/src/map/pc.h b/src/map/pc.hindex bec4522..c84c9a3 100644--- a/src/map/pc.h+++ b/src/map/pc.h@@ -547,6 +547,8 @@ struct map_session_data { const char* delunit_prevfile; int delunit_prevline; + bool candrop;+ }; #define EQP_WEAPON EQP_HAND_Rits should be simple to convert to rathena
  11. AnnieRuru

    map change

    from topic http://upaste.me/30b95b
  12. 20140115 maybe should move to client support ?
  13. from topic. . modify to EDIT wait ... I think got bug ok http://upaste.me/12d003 // config for level range set .party_level_range, 10;
  14. I noticed at the beginning of the script, there are *mes script commands so I guess you didn't post the duplicate npc part of course it will spam the dialog because you duplicated the OnPCLoadMapEvent labels multiple times change this - script Buff -1,{ mes "hi"; close;OnPCLoadMapEvent: buffing.... end;}prontera,x,y,z duplicate(Buff) Buff#1 100izlude,x,y,z duplicate(Buff) Buff#2 100geffen,x,y,z duplicate(Buff) Buff#3 100into this- script Buff -1,{ mes "hi"; close;}- script Buff#main -1,{OnPCLoadMapEvent: buffing.... end;}prontera,x,y,z duplicate(Buff) Buff#1 100izlude,x,y,z duplicate(Buff) Buff#2 100geffen,x,y,z duplicate(Buff) Buff#3 100so the OnPCLoadMapEvent doesn't get duplicated
  15. then type @invitelist to show all the guilds that has invited you. . only @guildinvite available to guild master
  16. no need src, just query_sql will do however there is no getguildlv script command, only getgdskilllv script command though very easy to code though prontera,147,175,6 script kjdhfksdjf 100,{ .@req_online = 11; // how many players need to online to claim. Default: 11 .@req_lv = MAX_LEVEL; // minimum level of .@online players that has to be. Default: MAX_LEVEL in mmo.h if ( !getcharid(2) ) { mes "you must have a guild"; close; } if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { mes "you are not a guild master"; close; } getguildmember getcharid(2), 1; getguildmember getcharid(2), 2; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) .@online++; if ( .@online < .@req_online ) { mes "your guild must have "+ .@req_online +" guild members online"; close; } .@origin = getcharid(3); for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( BaseLevel < .@req_lv ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "there are "+ .@c +" member does not meet the level requirement"; mes implode( .@deny_name$, "," ); close; } for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( #guild_package_claimed ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "there are "+ .@c +" members already claimed this package within their account"; mes implode( .@deny_name$, "," ); close; } if ( query_sql( "select account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2) +" group by last_ip", .@aid, .@ip$ ) < .@req_online ) { mes "same ip detected"; .@nb = query_sql( "select name, account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2), .@name$, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes (.@i +1)+". "+ .@name$[.@i] +" ("+ .@ip$ +")"; next; } mes "pass"; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( getguildmasterid( getcharid(2) ) != $@guildmembercid[.@i] ) getitem 501, 1; else getitem 501, 10; #guild_package_claimed = 1; } } attachrid .@origin; close;}
  17. this should work - script Anti_Assump -1,{OnInit: setarray .@map$[0],"prtg_cas03","gefg_cas04","payg_cas03","schg_cas01","guild_vs1"; .@size = getarraysize( .@map$ ); for ( .@i = 0; .@i < .@size; .@i++ ) { setd ".map_"+ .@map$[.@i], true; setmapflag .@map$[.@i], mf_loadevent; } end;OnPCLoadMapEvent: if ( getd( ".map_"+ strcharinfo(3) ) && getstatus(SC_ASSUMPTIO) ) { sc_end SC_ASSUMPTIO; message strcharinfo(0), "Assumptio buff are disable in GvG/WoE maps."; } end;}
  18. funny ... why your server always give me funny funny error that makes me headache ? honestly, can you post your ACMD(guild) ... isn't it something like this ? ACMD(guild){ char guild_name[NAME_LENGTH]; int prev; memset(guild_name, '0', sizeof(guild_name)); if (!message || !*message || sscanf(message, "%23[^n]", guild_name) < 1) { clif->message(fd, msg_txt(1030)); // Please enter a guild name (usage: @guild <guild_name>). return false; }....so either your server doesn't use the same format ...or your server just purposely hates me ??? EDIT: if this one doesn't work, I'm gonna use the dirty method char reason[100]; just 99 into 100
  19. this is so weird, I just copy paste the syntax from all other atcommand within that filebut how come only mine getting error ? try replace this line char reason[99], esc_reason[198], esc_name[46], min_display[3];into thisconst char* reason; char esc_reason[198], esc_name[46], min_display[3];;didn't test
  20. you must have `mob_db` table installed https://github.com/HerculesWS/Hercules/blob/master/sql-files/mob_db_re.sql `mob_db` or `mob_db_re` depends on your server renewal setting
  21. #Mission_Points search for it and delete every single line and also remove the npc shop below
  22. the header is rathena scripts lol so assumed that you are using rathena emulator mes "[Hunting Missions]"; mes "Oh, you're done!"; mes "Good work."; mes "Here's your reward."; emotion e_no1;add belowgetitem 7227, 3;btw, euphy updated the scripts into 1.4https://github.com/rathena/rathena/commit/3c24f45
  23. http://rathena.org/board/topic/82374-recovery-script-command/ I keep drooling for this command to be added, so Ima write one myself no more atcommand @raise, @raisemap or @alive anymore ! pull request-> https://github.com/HerculesWS/Hercules/pull/350
  24. AnnieRuru

    @item item_deny

    http://upaste.me/0eba84 ahahaha ~ use a little bit of trick, I wonder how much RAM usage if declare a big array ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.