Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Reputation Activity

  1. Upvote
    AnnieRuru got a reaction from Helena in Annieruru emp BG   
    I guess should just implement all the custom features that I know, since you keep requesting this and that
    better to overdo it and then let you suggest which feature you want me to take out,
    rather than keep asking for more features each time
    ... of course if you got some other features that you want to suggest, you can always post here
    http://upaste.me/fa2349922cf42b53b
    I wanted to add the rejoin system like I did on arathi basin or this bg_emp_0.6
    but it seems rathena cannot retrieve the instance variable outside of the instance npc,
    so unless you want to drop the instancing and use normal map ...
    EDIT: suddenly I think its possible ... every time a variable is set, push back as npc variable ... hmm ...
  2. Upvote
    AnnieRuru got a reaction from xVec in @partybuff / @spb   
    0.4 http://upaste.me/75d049918e2088402
    wow ~ thanks ... having an extra eye is different ...
    about turning the [BASF+] into player configured buff ...
    that will be done in another day ...
  3. Upvote
    AnnieRuru reacted to 4144 in @partybuff / @spb   
    in ACMD(showbuff) in line 275 you show error message and p is NULL, and after call clif->party_info(p), this call your overloaded function clif_party_info_overload, and here it validate parameter for NULL and show error message.
  4. Upvote
    AnnieRuru got a reaction from vykimo in Custom Unit HP Bar System   
    Move to Script Release
    nice idea !! if combine this with World Boss system I can see a lot of potential in this
  5. Upvote
    AnnieRuru got a reaction from luizragna in Custom Unit HP Bar System   
    Move to Script Release
    nice idea !! if combine this with World Boss system I can see a lot of potential in this
  6. Upvote
    AnnieRuru got a reaction from Habilis in Custom Unit HP Bar System   
    Move to Script Release
    nice idea !! if combine this with World Boss system I can see a lot of potential in this
  7. Upvote
    AnnieRuru reacted to luizragna in Custom Unit HP Bar System   
    Hello guys, i'm making a custom hp bar system for mob units.
    The command show the HP of the mob for all players in the map.
     
    I am using the cutin command, the problem is that I do not think so many files are necessary. In the case 1 image for each percentage of hp I would like your opnion and help to improve this system and make it lighter.
    Test yourselves :).
     
    HP Bar System:
    payon,147,229,4 script Test#HPbar 1_F_MARIA,{ if (.HP_Bar == 0) { .HP_Bar = 1; .mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie"); setunitdata .mobGID,UDT_MAXHP,4000; setunitdata .mobGID,UDT_HP,4000; .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); } end; OnDie: .HP_Bar = 0; end; OnHPBar: .U_MAXHP = getunitdata (.mobGID,UDT_MAXHP); while (.HP_Bar != 0) { .U_HP = getunitdata (.mobGID,UDT_HP); .P_HP = (.U_HP*100)/.U_MAXHP; cutin(""+.P_HP+"", 1); sleep2 100; } cutin("0", 1); sleep2 5000; //Delay to hide HP Bar cutin("", 255); end; }  







     
    Donwload of the data folder files: HP Bar System (2018-06-26).rar
  8. Upvote
    AnnieRuru got a reaction from Begin in noitem plugin   
    1.4
    plugin
    -- fix a rare bug if the user put multiple noitem on the same map, it spam non-sensible error
    ---- although this will overwrite the previous one without warning this time
  9. Upvote
    AnnieRuru got a reaction from TheReturn in noitem plugin   
    1.4
    plugin
    -- fix a rare bug if the user put multiple noitem on the same map, it spam non-sensible error
    ---- although this will overwrite the previous one without warning this time
  10. Upvote
    AnnieRuru got a reaction from xVec in @partybuff / @spb   
    http://upaste.me/aa5e49917485b4900
    I need some people to comment on my script
    I just bam bam and google here and there and it works on VS2015, but not sure if it is work on others though
    1. need help how to really optimize this code
    2.not really sure about using this kind of function
    char *showing_buff( struct map_session_data *sd ) { @meko
    @4144
     
    http://upaste.me/75d049918e2088402
    no idea how I get this error message, only pop up once
    [Error]: --- nullpo info -------------------------------------------- [Error]: ..\src\plugins\showbuff.c:115: 'p' in function `unknown' [Error]: --- end nullpo info ---------------------------------------- @xVec
  11. Upvote
    AnnieRuru got a reaction from OmarAcero in Help: Script Invasor   
    remember, the sleep type timer can run multiple times,
    and when *awake, will cancel ALL running timer
    prontera,155,185,5 script dhskfshfd 1_F_MARIA,{ sleep 30000; announce .t++ +" times", bc_all; end; OnInit: bindatcmd "ev", strnpcinfo(0)+"::Onaaa"; end; Onaaa: awake strnpcinfo(0); end; } click on the npc as many times as possible to queue up the timer
    and when type @ev, all gets execute at once
    my guess is you make the sleep for auto-invasion and the time remaining in the same npc
    so when you do a *awake, instead of you want only the timer for next invasion gets awaken, but the event in-progress timer also gets cancel
    since you have the "inv_msg" npc, make use of that to run another kind of npc timer
    yup, 1 npc, 1 timer
    @OmarAcero
    and, yeah, VERY bad script,
    should make the script read in linear form, not jump here and there
  12. Upvote
    AnnieRuru reacted to Functor in @partybuff / @spb   
    Also we can see this bug, when someone enters to the party.   It is caused by sending of 0x1E9 packet, which adds one specific party member to the list on the client side.   To fix bug of this plugin, we can disable sending of this packet.   Because in any case server always sends full list of party members in 0xFB packet.  
    before:
     
    HPExport void plugin_init (void) {
    add:
     
    void clif_party_member_info_overload(struct party_data* p, struct map_session_data* sd) { return; }  
    after:

    HPExport void plugin_init (void) {
    add:

    clif->party_member_info = &clif_party_member_info_overload;
  13. Upvote
    AnnieRuru reacted to Begin in Vendor Control (rewrite)   
    May I know the Discord link, Ms. Annie?
    Found it.
  14. Upvote
    AnnieRuru reacted to Haru in [2016-01-06] TBL_* typedefs and BL_CAST() variants   
    Rationale:
    This is part of a larger source cleanup project. Following the code style guidelines we decided to adopt (linux kernel guidelines), typedefs should be avoided except where necessary.
    At the same time, we noticed that we have far too many explicit casts through the code, that might easily hide a coding error (for example a variable that changed type), so we're going to try and remove as many of those as possible as well.
     
    Contents:
    The various TBL_* typedefs are completely unnecessary (they're only needed for internal use by the BL_CAST() macro). As such, they shouldn't be used through the code, so they have been deprecated (they're not marked as deprecated yet, due to technical reasons, but you can assume they are).
    Taking the chance, the BL_CAST() macro was changed to a family of macros (BL_CAST, BL_CCAST, BL_UCAST, BL_UCCAST), each with different behavior and purpose:
     
    - BL_CAST(): Casts its argument to the specified type, after ensuring the block list was of the correct type. The argument must be non-constant, and it may be evaluated more than once (i.e. unsafe to use with mapit->next(x))
    - BL_CCAST(): Same as BL_CAST, but it takes a const block list pointer, and returns a const object.
    - BL_UCAST(): Casts its argument to the specified type, without verifying the source block list (it is the caller's care to do that). The argument is guaranteed to be evaluated only once, making it suitable to be used with mapit->next(x) or similar functions.
    - BL_UCCAST(): Same as BL_UCAST(), but takes a const block list pointer, and returns a const object.
     
    Impact:
    Custom code may stop compiling until the appropriate changes are made. Changes are easy/trivial (mostly doable as a find and replace)
     
    Details:
    Any use of the TBL_* typedefs must be replaced with the corresponding struct:
     
    - TBL_PC -> struct map_session_data
    - TBL_NPC -> struct npc_data
    - TBL_MOB -> struct mob_data
    - TBL_ITEM -> struct flooritem_data
    - TBL_CHAT -> struct chat_data
    - TBL_SKILL -> struct skill_unit
    - TBL_PET -> struct pet_data
    - TBL_HOM -> struct homun_data
    - TBL_MER -> struct mercenary_data
    - TBL_ELEM -> struct elemental_data
     
    Any explicit casts of a struct block_list to any of the above types, should be replaced with the most appropriate BL_CAST() variant (as described above).
     
    Merge Date:
    Wed, 6 Jan 2016 17:36:33 +0300
     
    Related Pull Requests:
    - #1034 - https://github.com/HerculesWS/Hercules/pull/1034 - Changed all TBL_* to the appropriate structs [Haru]
    - #1024 - https://github.com/HerculesWS/Hercules/pull/1024 - Change all TBL_* to actual struct to follow unix kernel syntax [hemagx]
     
    Related Commits:
    - b69f7b8 - https://github.com/HerculesWS/Hercules/commit/b69f7b8 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_PC to struct map_session_data as per style guidelines [hemagx]
    - 1249dc2 - https://github.com/HerculesWS/Hercules/commit/1249dc2 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_MOB to struct mob_data as per strly guidelines [hemagx]
    - 3364658 - https://github.com/HerculesWS/Hercules/commit/3364658 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_HOM to struct homun_data as per style guidelines [hemagx]
    - 00c95f6 - https://github.com/HerculesWS/Hercules/commit/00c95f6 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_MER to struct mercenary_data as per style guidelines [hemagx]
    - b040c61 - https://github.com/HerculesWS/Hercules/commit/b040c61 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_SKILL to struct skill_data as per style guidelines [hemagx]
    - 829ebdd - https://github.com/HerculesWS/Hercules/commit/829ebdd - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_PET to struct pet_data as per style guidelines [hemagx]
    - 1f71f41 - https://github.com/HerculesWS/Hercules/commit/1f71f41 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_ELEM to struct elemental_data as per style guidelines [hemagx]
    - 3007a37 - https://github.com/HerculesWS/Hercules/commit/3007a37 - Sat, 26 Dec 2015 11:17:14 +0200 Change all TBL_NPC to struct npc_data as per style guidelines [hemagx]
    - a1b0dae - https://github.com/HerculesWS/Hercules/commit/a1b0dae - Sun, 27 Dec 2015 17:35:25 +0100 Introduced the BL_UCAST() macro as an alternative to explicit casts [Haru]
    - aa574e3 - https://github.com/HerculesWS/Hercules/commit/aa574e3 - Mon, 28 Dec 2015 15:14:22 +0100 Added const variants of BL_CAST/BL_UCAST: BL_CCAST/BL_UCCAST [Haru]
    - b3c722e - https://github.com/HerculesWS/Hercules/commit/b3c722e - Sun, 27 Dec 2015 18:17:24 +0100 Replaced some explicit casts with BL_UCAST/BL_UCCAST [Haru]
    - f878d5e - https://github.com/HerculesWS/Hercules/commit/f878d5e - Mon, 28 Dec 2015 00:16:39 +0100 Replaced some explicit casts with BL_UCAST/BL_UCCAST [Haru]
    - 2055585 - https://github.com/HerculesWS/Hercules/commit/2055585 - Mon, 28 Dec 2015 00:24:24 +0100 Replaced some map->id2sd calls with the proper map->id2XX function [Haru]
    - 5db8be9 - https://github.com/HerculesWS/Hercules/commit/5db8be9 - Mon, 28 Dec 2015 02:05:09 +0100 Moved status_get_homXXX macros to status.c [Haru]
    - 0e05c1e - https://github.com/HerculesWS/Hercules/commit/0e05c1e - Mon, 28 Dec 2015 15:13:02 +0100 Replaced some explicit casts with BL_UCAST [Haru]
    - e3eac13 - https://github.com/HerculesWS/Hercules/commit/e3eac13 - Mon, 28 Dec 2015 15:41:36 +0100 Replaced the remaining explicit casts with BL_CAST/BL_UCAST [Haru]
    - d5199ce - https://github.com/HerculesWS/Hercules/commit/d5199ce - Wed, 6 Jan 2016 17:36:33 +0300 Merge pull request #1034 from HerculesWS/bl_cast [Andrei Karas]
    - f0fb759 - https://github.com/HerculesWS/Hercules/commit/f0fb759 - Wed, 6 Jan 2016 15:37:16 +0100 HPM Hooks Update [Hercules.ws]
    - 0772dd0 - https://github.com/HerculesWS/Hercules/commit/0772dd0 - Wed, 6 Jan 2016 23:56:48 +0300 Fix null pointer access after previous commits. [Andrei Karas]
    - 2af2132 - https://github.com/HerculesWS/Hercules/commit/2af2132 - Fri, 8 Jan 2016 16:51:59 +0100 Fixed a mapserver crash (too small allocation) [Haru]
     
    Trivia:
    While many of the changes here would have been possible with find and replace, I decided to review each and every of them (the actual replacement was mostly done with a vim macro, but not fully automated so I could see what the code was, and possibly do additional cleanup by hand), in order to review up some old, wrong code. It turned out that we were casting things that we didn't need to cast, or using wrong map->bl2XX() functions in several places. It costed some hours of work, but it was definitely worth it.
  15. Like
    AnnieRuru got a reaction from IndieRO in Error when getunitdata from died unit   
    yeah we don't have *unitexists script command like rathena
    although I am also not sure want to implement or not
    because since the monster is set with a variable
    upon the monster died, the event label can reset the variable back to 0
     
    EDIT: ... maybe implement it then,
    with *unitexists script command maybe the .mobid there can become .@mobid
    PS: the script command setunitdata/getunitdata has more than 70% are not functioning,
    https://github.com/HerculesWS/Hercules/compare/stable...AnnieRuru:34-setunitdata
    and its not yet complete
     
  16. Upvote
    AnnieRuru got a reaction from Begin in Vendor Control (rewrite)   
    you should assume all my plugins broken, just like my signature says
    2.1
    script & plugin
    - fix the script and use constant properly
    - revert back to *unitwalk
  17. Upvote
    AnnieRuru got a reaction from OmarAcero in Help: Script Invasor   
    your profile said you are using Hercules
    but when I test the script all kinds of errors pop up
    [Error]: script_add_str: detected possible use of wrong case in a script. Found 'setBattleFlag', probably meant to be 'setbattleflag' (in 'npc/zzz.txt'). [Error]: script error in file 'npc/zzz.txt' line 158 column 3 parse_line: expect command, missing function name or calling undeclared func tion 155: 156: // Restore experience rates: 157: if(checkcell("prontera",0,0,cell_water)) { * 158: setBattleFlag "base_exp_rate",getBattleFlag("base_exp_rate") - $TIbr; ~~~~~~~~~~~~~~~~^ 159: setBattleFlag "job_exp_rate",getBattleFlag("job_exp_rate") - $TIjr; 160: set $TIbr,0; 161: set $TIjr,0; [Error]: script error in file 'npc/zzz.txt' line 158 column 46 parse_line: need ';' 155: 156: // Restore experience rates: 157: if(checkcell("prontera",0,0,cell_water)) { * 158: setbattleflag "base_exp_rate",getBattleFlag("base_exp_rate") - $TIbr; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 159: setbattleflag "job_exp_rate",getBattleFlag("job_exp_rate") - $TIjr; 160: set $TIbr,0; 161: set $TIjr,0; [Error]: script error in file 'npc/zzz.txt' line 332 column 48 parse_line: expect command, missing function name or calling undeclared funtion 329: end; 330: 331: OnPCDieEvent: * 332: if((.a > 0) && (getsavepoint(0) == .c2$[.b])) save .s$,.sx,.sy; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 333: end; 334: 335: OnWhisperGlobal: this script is not meant for Hercules
    ok the script loads fine in rathena
    [Warning]: buildin_monster: Attempted to spawn non-existing monster class 2503 [Debug]: Source (NPC): invasor (invisible/not on a map) [Warning]: buildin_monster: Attempted to spawn non-existing monster class 1228 [Debug]: Source (NPC): invasor (invisible/not on a map) can you just read the map-server.exe for all the errors ?
    this is a bad ... script ... unreadable ...
    why I have to refer to what the t1 c1 c2 t2 means ...
    why not just make a proper variable name like .t1 = .min_time , .t3 = .duration
    I cannot read this script, I'm out
  18. Upvote
    AnnieRuru got a reaction from Begin in Card Shredder Edit   
    split topic from http://herc.ws/board/topic/15934-card-shredder/
     
    @Begin
    prontera,155,185,4 script Card trader 2_VENDING_MACHINE1,{ mes "[Card trader]"; mes "Please select the card you wish to trade."; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == IT_CARD ) { .@menu$ += getitemname( @inventorylist_id[.@i] ) +":"; .@cardid[.@c++] = @inventorylist_id[.@i]; } } .@menu$ += "No Card - Close"; next; .@s = select( .@menu$ ) -1; if ( .@s == .@c ) close; while ( .@cardid[.@s] != .mvpcardid[.@i] && .@i < .mvpcards ) { ++.@i; } if ( .@i < .mvpcards ) .@rate = 3; else .@rate = 1; mes "[Card trader]"; dispbottom countitem( .@cardid[.@s] ) +""; if ( countitem( .@cardid[.@s] ) > 1 ) { mes "Input how many you want to trade ?"; next; input .@amount, 0, countitem( .@cardid[.@s] ); if ( !.@amount ) close; mes "[Card trader]"; mes "Are you sure you want to trade"; mes .@amount +"x "+ getitemname( .@cardid[.@s] ); mes " for "+( .@rate * .@amount )+" Poring Coins ?"; } else { .@amount = 1; mes "Are you sure you want to trade a "+ getitemname( .@cardid[.@s] ) +" for "+ .@rate +" Poring Coins ?"; } next; if ( select ( "Yes.", "No" ) == 2 ) close; delitem .@cardid[.@s], .@amount; getitem Poring_Coin, .@rate * .@amount; close; OnInit: .mvpcards = query_sql("select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where mexp > 0 and type = 6 group by name_japanese;", .mvpcardid); end; } simple script
    although I wanted to do page by page ... but when realize MAX_INVENTORY is just 100, while menu string limit is 2047,
    means need 20 string length of each card item name to crash the client ... so don't need to do page by page
  19. Upvote
    AnnieRuru reacted to 4144 in About woe rank in eAmod in Hercules   
    struct unit_data *ud = unit->bl2ud(bl); if (ud == NULL) return false; script_pushint( st, ud->skill_id ); // always return 0 //script_pushint( st, ud->dir ); // works something like this
  20. Upvote
    AnnieRuru got a reaction from Begin in Card Shredder Edit   
    I admit its cool idea, reminds me the card trader event I made long time ago
    http://herc.ws/board/topic/11367-card-collector/
    the problem is your script, and you should be glad you have posted on the board
    let me simplify it ...
    prontera,155,185,4 script Card Shredder 2_VENDING_MACHINE1,{ mes "[ Card Shredder ]"; mes "You can shred cards to earn premium currency"; mes "would you like to shred any cards? "; next; if ( select ( "Yes.", "No" ) == 2 ) close; mes "[ Card Shredder ]"; mes "Please select the card you wish to shred."; getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( getiteminfo( @inventorylist_id[.@i], ITEMINFO_TYPE ) == 6 ) { .@menu$ += getitemname( @inventorylist_id[.@i] ) +" "+ callsub( L_Coins, @inventorylist_id[.@i] ) +" Coins:"; .@cardid[.@c++] = @inventorylist_id[.@i]; } } .@menu$ += "No Card - Close"; next; .@s = select( .@menu$ ) -1; if ( .@s == .@c ) close; mes "[ Card Shredder ]"; mes "are you sure you want to shred a "+ getitemname( .@cardid[.@s] ) +" for "+ callsub( L_Coins, .@cardid[.@s] ) +" coins ?"; next; if ( select ( "Yes.", "No" ) == 2 ) close; delitem .@cardid[.@s], 1; getitem Poring_Coin, callsub( L_Coins, .@cardid[.@s] ); ++$cardid_shredded[ .@cardid[.@s] ]; close; L_Coins: if ( $cardid_shredded[ getarg(0) ] < 5 ) return 5; else if ( $cardid_shredded[ getarg(0) ] < 10 ) return 4; else if ( $cardid_shredded[ getarg(0) ] < 15 ) return 3; else if ( $cardid_shredded[ getarg(0) ] < 20 ) return 2; else return 1; } I made it in a way without using 2 permanent variables
    also found a bug though ... line 713
    if (.@cardval < 1) set cardval,10; if (.@menu == 454) close; why do you set a permanent player variable ... there ?

    and about the issue about having too many cards in the menu, can be done with page system
    https://rathena.org/board/topic/74630-help-array/
  21. Upvote
    AnnieRuru got a reaction from Begin in Card Shredder Edit   
    L_Coins: if ( $cardid_shredded[ getarg(0) ] < 5 ) return 5; else if ( $cardid_shredded[ getarg(0) ] < 10 ) return 4; else if ( $cardid_shredded[ getarg(0) ] < 15 ) return 3; else if ( $cardid_shredded[ getarg(0) ] < 20 ) return 2; else return 1; I've read the original script, and in that script .... as you can see here the value will decrease the more players shred their cards
    although I also prefer to have a fix value ... though
    yes its possible ... but you want a fix value or a descending value ?
    you know ... if its a fix value ... then sounds like a card trader npc
  22. Upvote
    AnnieRuru reacted to Asheraf in kRO unpacked clients releases   
    Discontinued. 
    Clients without themida protection can be downloaded at http://nemo.herc.ws/downloads/
  23. Upvote
    AnnieRuru reacted to Habilis in LOGIN REWARD VIA LAST MAC   
    Oh yes, there is one way of doing it.
    doing it the Habilis way. True, it's a bit painful and awkward way,(couldn't be different with Habilis) but this is better than trying to figure out MACs (My MAC changes at every system startup) and IPs.
  24. Upvote
    AnnieRuru got a reaction from Helena in Annieruru emp BG   
    change this line 103
    bg_get_data 'winside, 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem getvariableofnpc( .rewarditem[0], 'main$ ), getvariableofnpc( .rewarditem[1], 'main$ ), $@arenamembers[.@i]; into
    bg_get_data 'winside, 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem 501, 10, $@arenamembers[.@i]; bg_get_data ('winside == 'red)? 'blue:'red, 1; for ( .@i = 0; .@i < $@arenamemberscount; ++.@i ) getitem 501, 5, $@arenamembers[.@i];  
    btw rathena seems going to get rid of CSV format and going for YAML format
    https://github.com/rathena/rathena/pull/3163
    so just take note of this when instancing doesn't work
  25. Upvote
    AnnieRuru reacted to Habilis in LOGIN REWARD VIA LAST MAC   
    @AnnieRuru
    Thanks, Very neat advice will try that!
     
×
×
  • Create New...

Important Information

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