Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Posts posted by AnnieRuru


  1. 5 hours ago, fiction said:

    Hi @AnnieRuru do you dropped this awesome project 🐀 ?

    HAHAHA !!

    already like more than 5 people reminds me about this on discord XD

     

    oh yeah I take this time to tell hercules community

    few days ago a server that runs on hercules complained that we don't have enough battleground scripts

    then I check my repo -> https://github.com/AnnieRuru/Release/tree/master/scripts/Battlegrounds

    ONLY ONE which is bg_assasination -> https://github.com/AnnieRuru/Release/blob/master/scripts/Battlegrounds/bg_assassination.txt <-- yes this is safe to use in live server

    the rest are rathena .... !

    LMAO !!

     

    I actually has more than 8 battlegrounds scripts, although many in same variations, but its still a quite amount

    I think can start ONLY the battleground part after the `@packetfilter` done
    2 more paid service to go (1 of them is yours)


  2. /**
     * Loads persistent NPC Barter Data from SQL
     **/
    static void npc_barter_fromsql(void)
    {
        struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle);
        char name[NAME_LENGTH + 1];
        int itemid;
        int amount;
        int removeId;
        int removeAmount;
    
        if (SQL_ERROR == SQL->StmtPrepare(stmt, "SELECT `name`, `itemId`, `amount`, `priceId`, `priceAmount` FROM `%s`", map->npc_barter_data_db)
            || SQL_ERROR == SQL->StmtExecute(stmt)
            ) {
            SqlStmt_ShowDebug(stmt);
            SQL->StmtFree(stmt);
            return;
        }

    npc_barter_data_db is
    https://github.com/HerculesWS/Hercules/blob/stable/conf/common/inter-server.conf#L120

    npc_barter_data_db: "npc_barter_data"

     

    means you are missing a table name `npc_barter_data`

    https://github.com/HerculesWS/Hercules/blob/stable/sql-files/upgrades/2018-12-29--07-51.sql

     

    how can you ignore the SQL update file ?


  3. *1 month later*

     

    ok let's see

    On 9/18/2020 at 4:48 PM, evilpuncker said:

    question:

    - how do I change the class check so I could show the body style menu to a few more classes (soul linker and star gladiator) 

    already done here, also I tried in my test server, my hexed client doesn't have additional body style support for soul linker etc ...
    so its your custom stuffs

     

    On 9/18/2020 at 4:48 PM, evilpuncker said:

    - add a setting to block cloth color change if you have a body style > than 0 (people using custom palettes will love this because body style palette is different than current one)

    each body style has its own array ? its own CSV style string again ?

    ..... you dummy baka baka baka baka baka

     

    On 9/18/2020 at 4:48 PM, evilpuncker said:

    - make the npc change the color only if the user chose option: "I want this color", otherwise just make it show the colors but if user close the npc or exit, revert to original color

    use *changelook instead of *setlook

    On 9/18/2020 at 4:48 PM, evilpuncker said:

    - arrange the menu dynamically so if I select the Previous option, it will become the first menu option so I can browse the colors backward easily, until I select Next again

    add .@reverse_order variable

     

    1.7 - script

    - add reverse_order to swap Next/Previous order

    - now players don't have to go to flux cp every time to reset their look when client crash, since this script uses changelook instead of setlook now

     

     

     

    On 9/18/2020 at 4:48 PM, evilpuncker said:

    not so useful suggestion, but kinda a dream:

    - option to save/load style set (cloth, hair color and hair style), just like those npc that save builds, saving them with an account variable so for example you could save a style that you liked and then instead of having to browse between everything again in another char, you just talk with npc and load that same style you saved before 

    .... account ?

    if I have a 3rd job, save this built, apply to summoner job,
    BAM client crash

    nice idea but isn't very practical to have ....

     

    for example Rushia changed her hair color from Green to Pink ... I can't recognize her for awhile

    and all the fan art about her has green color hair =/

    she try to change her look but what she did was smack her own fan art

     

    EDIT: I think can make this possible JUST don't give save/load option for doram class ...


  4. there are already 4 members asked me about pvp statue in discord ......

    2 from hercules side, 2 from rathena side ....

    .... I think I just release this to public

     

    in case those who doesn't know what pvp statue is ->

    https://rathena.org/board/topic/124379-pvp-ladder-show-top-5-player/

    https://rathena.org/board/topic/126090-pvp-ladder-show-top-5-player-statue/

    https://rathena.org/board/topic/125602-statue-npc-not-pvp-rankings/

     

     

    screen2020Hercules003.jpg

     

    3.3 - script

    - add PVP ladder statues

     

     

    Question ... should I also make this for rathena ?
    I don't mind adding this simple stuff in version 2.9


  5. I suddenly remember I did this stuff years ago, forgot where is the topic
    or maybe its in eathena forum which already gone

    yeah suddenly it came back to me
     

    https://gist.github.com/AnnieRuru/aef19ddbaf2bd1f432bd53ea78a32d5d

     

    REALLY TESTED IT THIS TIME

    screen2020Hercules002.jpg

    note in the screenshot, I change my computer time to 12:00am and wait until it respawn,

    now its evening here but I change my computer time just to test the OnClock0001: works


  6. yeah upon re-read it again, seem like what I did was, once the guild master claimed the treasure, forever no treasure chest spawn

     

    so let's reaffirm the theory, OFFICIALLY

    -> the treasure chest are only spawn every 12:01am

    -> if the guild master killed it, it will respawn on next 12:01am

    -> if the guild master didn't kill it, it won't respawn on next 12:01am

    -> if server restart, the treasure chest are gone <-- OFFICIAL

     

    since you want unofficial behavior anyway - how about let's do unofficial way
     

    revert your agit_main.txt to original then apply this

    https://gist.github.com/AnnieRuru/aef19ddbaf2bd1f432bd53ea78a32d5d

     

    what this does ->

    1. every time the server restart, it respawn the treasure chest, whether the guild master killed it or not
    -> the treasure chest are respawn every 12:01am AND server restart

    -> if the guild master forgot to kill treasure chest, it will respawn upon server restart

    -> the guild master that ALREADY kill treasure chest, it will ALSO respawn upon server restart, they get 2x for that day

    2.  everytime the server restart, and 12:01am if the guild master invested in economy and defence, the value also gone up

     

     

    if you still want to separate the OnInit and OnClock, I just realize needs to set another server variable

    1 for day, 1 for treasure, I don't want to do that unpaid (needs to rewrite that whole damn function)

    so let's keep things simple for everyone

     

    -	script	main	FAKE_NPC,{
    OnClock0000:
    	for (.@i = 0; .@i < 4; ++.@i) {
    		if ((.treasure & (1<<.@i)) == 0) {
    			monster "prontera", 150+.@i, 185, "Treasure Chest", 1354,1, strnpcinfo(NPC_NAME)+"::OnTreasureDied"+.@i;
    			.treasure |= (1<<.@i);
    		}
    	}
    	end;
    OnTreasureDied0: .treasure &= ~1; end;
    OnTreasureDied1: .treasure &= ~2; end;
    OnTreasureDied2: .treasure &= ~4; end;
    OnTreasureDied3: .treasure &= ~8; end;
    	end;
    }
    
    prontera,155,180,5	script	next day	1_F_MARIA,{
    	donpcevent "main::OnClock0000";
    }
    
    prontera,149,180,5	script	cleanmap	1_F_MARIA,{
    	cleanmap strcharinfo(PC_MAP);
    }
    
    prontera,151,180,5	script	mobcount	1_F_MARIA,{
    	dispbottom getunits(BL_MOB, .@a, 0, "prontera") +"";
    }

    nvm let me try again

    -	script	sdfksdjf	1_F_MARIA,{
    OnInit:
    OnClock0000:
    	for (.@i = 0; .@i < 4; ++.@i) {
    		if ($killedday[.@i] != atoi(gettimestr("%Y%m%d", 20))) {
    			monster "prontera", 150 +.@i, 185, "Treasure Chest", 1354,1, strnpcinfo(NPC_NAME)+"::OnTreasureDied"+ .@i;
    		}
    	}
    	end;
    OnTreasureDied0: $killedday[0] = atoi(gettimestr("%Y%m%d", 20)); end;
    OnTreasureDied1: $killedday[1] = atoi(gettimestr("%Y%m%d", 20)); end;
    OnTreasureDied2: $killedday[2] = atoi(gettimestr("%Y%m%d", 20)); end;
    OnTreasureDied3: $killedday[3] = atoi(gettimestr("%Y%m%d", 20)); end;
    	end;
    }
    
    prontera,155,180,5	script	debug	1_F_MARIA,{
    	dispbottom $killedday[0] +"";
    	dispbottom $killedday[1] +"";
    	dispbottom $killedday[2] +"";
    	dispbottom $killedday[3] +"";
    }
    
    prontera,149,180,5	script	reset	1_F_MARIA,{
    	deletearray $killedday;
    }

    now combine these 2 scripts


  7. 1.3 - script

    - fix a bug the 'Promotion code has Started' didn't even activate after a server restart

    - fix a bug when GM edit the start/expire date field, the announcement didn't update along with it ... should have just disable it when countdown initiated

    - fix a bug when GM close a promo code, it doesn't announce a GM has closed it, yet its still make announcement about still can claim promo code

     

    OKies I'm gonna leave this script and go do some other project ...
    maybe some other day can come back and rewrite this script entirely with .npc_var only sync with SQL variables so don't have to call query_sql so frequently ...

    but as it stands now, this script is 1400 lines, not something to be underestimate


  8. Knight: {
    	inherit: ( "Swordsman" );
    
    	skills: {
    		KN_SPEARMASTERY: 10
    		KN_PIERCE: {
    			MaxLevel: 10
    			KN_SPEARMASTERY: 1
    		}
    		KN_BRANDISHSPEAR: {
    			MaxLevel: 10
    			KN_RIDING: 1
    			KN_SPEARSTAB: 3
    		}
    		KN_SPEARSTAB: {
    			MaxLevel: 10
    			KN_PIERCE: 5
    		}
    		KN_SPEARBOOMERANG: {
    			MaxLevel: 5
    			KN_PIERCE: 3
    		}
    		KN_TWOHANDQUICKEN: {
    			MaxLevel: 10
    			SM_TWOHAND: 1
    		}
    		KN_AUTOCOUNTER: {
    			MaxLevel: 5
    			SM_TWOHAND: 1
    		}
    		KN_BOWLINGBASH: {
    			MaxLevel: 10
    			SM_BASH: 10
    			SM_MAGNUM: 3
    			SM_TWOHAND: 5
    			KN_TWOHANDQUICKEN: 10
    			KN_AUTOCOUNTER: 5
    		}
    		KN_RIDING: {
    			MaxLevel: 1
    			SM_ENDURE: 1
    		}
    		KN_CAVALIERMASTERY: {
    			MaxLevel: 5
    			KN_RIDING: 1
    		}
    		KN_CHARGEATK: 1
    		KN_ONEHAND: {
    			MaxLevel: 1
    			KN_TWOHANDQUICKEN: 10
    		}
    		TF_HIDING: 10
    	}
    }

    ok I don't know why, but the TF_HIDING has to be the last ... probably because it is [25] ??
    previously can't learn the skill, now suddenly can

     

    Actually I don't know why sometimes can put skill points in and sometimes it doesn't work either !!


  9. no need patch, just pure skill tree

     

    db\re\skill_tree.conf

    Knight: {
    	inherit: ( "Swordsman" );
    
    	skills: {
    		TF_HIDING: 10
    		KN_SPEARMASTERY: 10
    		KN_PIERCE: {
    			MaxLevel: 10
    			KN_SPEARMASTERY: 1
    		}

    data\luafiles514\lua files\skillinfoz\skilltreeview.lub

    	[JOBID.JT_KNIGHT] = {
    		[0] = SKID.KN_TWOHANDQUICKEN,
    		[1] = SKID.KN_AUTOCOUNTER,
    		[2] = SKID.KN_RIDING,
    		[3] = SKID.KN_SPEARMASTERY,
    		[6] = SKID.KN_CHARGEATK,
    		[8] = SKID.KN_BOWLINGBASH,
    		[9] = SKID.KN_CAVALIERMASTERY,
    		[10] = SKID.KN_PIERCE,
    		[13] = SKID.KN_ONEHAND,
    		[16] = SKID.KN_SPEARBOOMERANG,
    		[17] = SKID.KN_SPEARSTAB,
    		[24] = SKID.KN_BRANDISHSPEAR,
    		[25] = SKID.TF_HIDING
    	},

    data\luafiles514\lua files\skillinfoz\skillinfolist.lub

    	[SKID.TF_HIDING] = {
    		"TF_HIDING",
    		SkillName = "Hiding",
    		MaxLv = 10,
    		SpAmount = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
    		bSeperateLv = true,
    		AttackRange = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    		NeedSkillList = {
    			[JOBID.JT_THIEF] = {
    				{ SKID.TF_STEAL, 5 }
    			}
    		}
    	},

     

    and if having trouble when client clash, don't unpack from data.grf, copy the one from translation team


  10. 1.2 - script

    - fix a bug after the code expire, the "list player has claimed this code" option is missing

    - fix a bug that when the code suddenly triggered/start, GM still can do edit

    - add some text to tell why players can't claim the code

    - add announcement when the Promotion Code activate and expire

     

    EDIT: found another bug, when using EDIT start/expire time, the announcement doesn't react ....
    I don't know how to fix this one <-- let's try trigger every hour

     


     

    13 hours ago, gidzdlcrz said:

    Will this work to rathena? Thanks Annie! ♥

    a big word NO

    2 conditions then I'll consider

     

    No.1 - tell rathena developers to merge *getcalendartime script command

    https://github.com/HerculesWS/Hercules/commit/79b69495bbc5d758529a485eb1144bd64b8ea50f

     

    No.2 - tell rathena developers that *preg_match to follow the exact PHP style format, that can return $array

    https://www.php.net/manual/en/function.preg-match.php

     

    currently rathena's preg_match is like this

    *preg_match(<regular expression pattern>,<string>{,<offset>})

    I want this

    *preg_match(<regular expression pattern>,<string>{,<offset>{,<output array>,{<flag>}}})

     

    if rathena has these 2 script commands, then only I'll consider
    because this script is using them, without these 2 script commands it just won't feel the same functionality if these 2 features are scrap


  11. conf\map\battle\client.conf

    // Limits use of blank (transparent) pixels in guild emblems to a set
    // percentage of the total.
    // Official servers do not enforce this technically to date, but some disallow
    // use of blank emblems in their rules. (Note 2)
    // A value of 100 (allowing 100% blank pixels) disables this check.
    // NOTE: Enabling this option slightly degrades performance.
    client_emblem_max_blank_percent: 100

     

    I think this is the answer you are looking for

    @Kuroyama


  12.  src/map/skill.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/map/skill.c b/src/map/skill.c
    index 748570792..07dd365ca 100644
    --- a/src/map/skill.c
    +++ b/src/map/skill.c
    @@ -4895,7 +4895,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl
     
     						unit->movepos(src, bl->x+x, bl->y+y, 1, 1);
     					}
    -					clif->slide(src, src->x, src->y);
    +//					clif->slide(src, src->x, src->y);
     					clif->fixpos(src);
     					clif->spiritball(src);
     				}

     

    ..... WEIRD ..... why disable the clif->slide shows the sliding animation for non-renewal client ????

     

    hmm .... this is something I could never figure out, yeah the code works fine for renewal clients, but for non-renewal client, just disable that line ... what ??

     

    honestly I'm not that good in coding skills nor client side ... clif.c stuffs,

    this actually not within my field of expertise especially I have to download multiple client version just to test this


  13. I got 2 rep up for making that grumbling post, that just shows how many members really like this idea
    and of course I knew many topics talking about this script again and again and again and again and again and again and again and again and again and again and again and again !!!

    so I make one myself and hopefully don't want see people talking about that bug script again !!

     

    What this script does ?

    GM generate some sort of gibberish word and promotes it on social media

    then players input that gibberish word and able claim the items

     

    honestly I don't really see the point of gibberish word,

    I made this script in a drop down menu, players can just select it from the menu and claim it <_<

     

    Download: 1.3

    script

     

    here's an example by Philippine RO, from this post

    promotianal_code_example.PNG

     

    TODO :

    1. add coloring to the text

    2. HULD compatible ?

    3. maybe someday can rewrite this whole damn thing with .npc_var sync with SQL variables so don't have to call query_sql too frequently

     

    Spoiler

    1.0 - script

     

    1.1 - script

    - add list all players that has claimed this code

    - add a variable to disable removal of past promotional code, because I know some server has trust issue with other GMs

     

    1.2 - script

    - fix a bug after the code expire, the "list player has claimed this code" option is missing

    - fix a bug that when the code suddenly triggered/start, GM still can do edit

    - add some text to tell why players can't claim the code

    - add announcement when the Promotion Code activate and expire

     

    1.3 - script

    - fix a bug the 'Promotion code has Started' didn't even activate after a server restart

    - fix a bug when GM edit the start/expire date field, the announcement didn't update along with it ... should have just disable it when countdown initiated

    - fix a bug when GM close a promo code, it doesn't announce a GM has closed it, yet its still make announcement about still can claim promo code

     


  14. Spoiler

     

    look below a bit and you'll see clif->sendlook command
    clif->sendlook also needs to update BODY2

     

    I'll try not to give out too much ... oh wait, this is request section,

    honestly I want to make this a long thread and let you learn step by step process, but nah, request section ... spoon feed

     

    NEXT ---- you'll soon discover clif->changelook isn't the function you'll looking for,

    
     src/map/clif.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/map/clif.c b/src/map/clif.c
    index 54c9869c3..0204baefc 100644
    --- a/src/map/clif.c
    +++ b/src/map/clif.c
    @@ -3784,6 +3784,7 @@ static void clif_changelook(struct block_list *bl, int type, int val)
     			case LOOK_BODY2:
     				if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING)
     					val = 0;
    +				clif->sendlook(bl, bl->id, LOOK_CLOTHES_COLOR, 0, 0, AREA);
     				vd->body_style = val;
     			break;
     	}

    `@bodystyle 1`

    yes this will temporary change the look, but `@go 0` you'll soon see the cloth color change back to original value

    because doing like this is equivalent to *changelook script command

     

    NEXT -----


     

    4 hours ago, evilpuncker said:

    (what I want in case it wasn't clear: when changing body style -> reset cloth color to zero)

    correct answer is just make changes to the stylist script

    prontera,170,180,1	script	Stylist#custom_stylist	2_M_DYEINGER,{
    	.@choose = select( "Hair Style", "Hair Color", "Cloth Color", ( !(eaclass() & EAJL_THIRD) || BaseJob == Job_SuperNovice )? "": _("Body Style") ) -1;
    	if (.@choose == 3) // JUST ADD THIS FUCKING SIMPLE LINE
    		setlook LOOK_CLOTHES_COLOR, 0;
    	.@lookpart = .@part = .look[.@choose];
    	if ( BaseClass == Job_Summoner )
    		.@part += Job_Summoner;

     

    btw I have at least 4 paid service line up right now so .... that reply you made on my stylist script, takes time to write so yeah ........


  15. you do know that ... int type ......

    static void clif_changelook(struct block_list *bl, int type, int val)

    when do `@bodystyle` the atcommand did say

    pc->changelook(sd, LOOK_BODY2, body_style);

    so WHY are you looking at case LOOK_CLOTHES_COLOR: ??

    go look at case LOOK_BODY2: ....

    			case LOOK_BODY2:
    				if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING)
    					val = 0;
    				vd->body_style = val;
    			break;

     

    2 hours ago, evilpuncker said:

    I'm avoiding to use the Ignore missing palette diff because reasons)

    https://rathena.org/board/topic/75755-i-would-like-to-report/?do=findComment&comment=164148

    hmm ... so bad that those pictures are gone, that neon pack


  16. so far I have never failed to convert anything into plugin

    mainly due to plugin allow function overload

    https://github.com/HerculesWS/Hercules/wiki/Hercules-Plugin-Manager

     

    although I still recommend using hooking instead of overloading as much as possible,
    as having 2 plugins overloading the same function might cause problems for your server

     

    EDIT: example of overload a function

    https://github.com/AnnieRuru/Release/blob/master/plugins/branch_displayname.c

×
×
  • Create New...

Important Information

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