Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Reputation Activity

  1. Like
    AnnieRuru got a reaction from evilpuncker in Item drop with random refine level/card   
    the cards can be done by retrieve the card ID from `item_db` SQL table, its not that hard to do
    https://github.com/AnnieRuru/Release/blob/master/plugins/addrefinedrop/addrefinedrop_0.2.c
    btw, this is simple stuffs ....
    PS: when testing, I turned on autoloot and using custom identifier script
  2. Like
    AnnieRuru got a reaction from Naruto in MVP Hunter Points w/ Rank   
    I do have my own MVP ranking script
    https://github.com/AnnieRuru/Release/tree/master/scripts/Games %26 Events/MVP Rank
     
     
    usually people do this simply with
    if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { but since you have 3 different modes, you also have to list out which MVP is easy/moderate/hard
    a quick sql query to list out MVP in your server
    select * from mob_db where mexp > 0; note its different in renewal and pre-renewal
    Renewal -> http://herc.ws/board/topic/16631-npc-mvp-invasion/?do=findComment&comment=90910
    Pre-renewal -> https://github.com/rathena/rathena/blob/master/npc/custom/events/mvp_ladder.txt#L232-L270
     
     
    this one needs achievement system ... its already in my top-priority todo list
    once its out, I can also add *settitleid script command and so on ...
     
     
    and before you forget, the OnNPCKillEvent cannot run on monsters with event labels
    http://herc.ws/board/topic/15991-onnpckillevent-changes/
    so it couldn't add the kills like bio-lab MVPs , instance MVPs and so on
    that pull request got stuck ...
     
    oh PS: pajodex is currently busy in real life, or so I heard
  3. Upvote
    AnnieRuru reacted to Emistry in OnPCUseSkillEvent   
    I have been waiting for this soooooo loooonnnnggggg tiimmmmeeee...
    anyway, just curious, since its just adding a new field "event_label", why not consider alter the existing "skill_db" and add the field there?
  4. Upvote
    AnnieRuru got a reaction from Emistry in OnPCUseSkillEvent   
    finally update this after 4 years....
     
    1.3 - plugin
    - update to latest revision
    - fix server crash when parse the string in OnPCUseSkillEvent.txt
    - help clean the temporary player variable
    1.4 - plugin
    - remove the 100 array limit by utilize VECTOR
    - drop CSV format and use Hercules standard libconfig format
  5. Upvote
    AnnieRuru got a reaction from skyundersea in Portal Skill   
    this is not fixed location, OnPCUseSkillEvent allow to create warp portal anywhere with a target cursor
    and if you want to change player's warp portal coordinate, just do bindatcmd "@memoportal" something like that
    "@memoportal 1" will save the location for 1st location on level 1 portal ...
    "@memoportal 2" will save the location for 2nd location on level 2 portal ...
    if I still remember correctly, this OnPCUseSkillEvent allows to create up to level 100
    let me test ....
    yup, level 100 warp portal after apply this patch
    src/map/pc.c | 2 +- src/map/skill.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index ea18715bb..9882fe2a8 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4230,7 +4230,7 @@ static int pc_skill(struct map_session_data *sd, int id, int level, int flag) ShowError("pc_skill: Skill with id %d does not exist in the skill database\n", id); return 0; } - if( level > MAX_SKILL_LEVEL ) { + if ( id != 2993 && level > MAX_SKILL_LEVEL ) { ShowError("pc_skill: Skill level %d too high. Max lv supported is %d\n", level, MAX_SKILL_LEVEL); return 0; } diff --git a/src/map/skill.c b/src/map/skill.c index 633a73d67..d2ee741b5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14154,7 +14154,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s } } - if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL ) + if ( skill_id != 2993 && ( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL ) ) return 0; require = skill->get_requirement(sd,skill_id,skill_lv);
     
    remember, since OnPCUseSkillEvent is basically an NPC script, you can manipulate it with any kind of script commands available
    bindatcmd + save a player variable ... or open a menu with select script command ....
    what ever you like
  6. Upvote
    AnnieRuru got a reaction from skyundersea in Portal Skill   
    now that I've fixed OnPCUseSkillEvent, its time to show off its awesomeness its usefulness
    you also need 2nd plugin to do this
    https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/npc-duplicate.c
     
    db/re/skill_db.conf
    { Id: 2993 Name: "CUSTOM_setpos" Description: "CUSTOM_setpos" MaxLevel: 3 Range: 15 SkillType: { Place: true } CoolDown: 10000 },  
    data/luafiles514/lua files/skillinfoz/skillinfolist.lub
    [SKID.CUSTOM_setpos] = { "CUSTOM_setpos"; SkillName = "Get Position", MaxLv = 3, Type = "Quest", SpAmount = { 0 }, bSeperateLv = true, AttackRange = { 15 }, },  
    data/luafiles514/lua files/skillinfoz/skillid.lub
    CUSTOM_setpos = 2993,  
    data/luafiles514/lua files/skillinfoz/skilldescript.lub
    [SKID.CUSTOM_setpos] = { "Warp to various towns", "MAX Lv : 3 ", "Lv 1: warp to prontera.", "Lv 2: warp to payon.", "Lv 3: warp to alberta.", },  
    conf/import/OnPCUseSkillEvent.conf
    OnPCUseSkillEvent: ( { SkillName: "CUSTOM_setpos" Event_Label: "qwer::Onpos" }, )  
    and finally the npc script
    - script asdf FAKE_NPC,2,2,{ end; OnTouch: switch( $@warplv ) { case 1: warp "prontera", 156,191; break; case 2: warp "payon", 162,233; break; case 3: warp "alberta", 192,147; } end; OnInit: switch( $@warplv ) { case 1: waitingroom "prontera", 0; break; case 2: waitingroom "payon", 0; break; case 3: waitingroom "alberta", 0; } end; } - script qwer FAKE_NPC,{ Onpos: if ( @create_warp_npc_delay + 10 > gettimetick(2) ) { dispbottom "cooldown"; end; } @create_warp_npc_delay = gettimetick(2); .@i = .i++; $@warplv = @useskilllv; duplicatenpc "asdf", "asdf", .@i +"", strcharinfo(PC_MAP), @useskillx, @useskilly, DIR_SOUTH, 1_SHADOW_NPC, 2,2; $@warplv = 0; sleep 5000; duplicateremove "asdf#"+ .@i; end; OnPCStatCalcEvent: skill CUSTOM_setpos, 3; end; }  
    result

     
    this screenshot is NOT tampered ... taken in-game without any photoshop or ms-paint edits
  7. Upvote
    AnnieRuru got a reaction from Kuroe in fixedaspd mapflag   
    1.2 - plugin
    - update to latest revision
    - add GM level bypass restriction
    - add *setmapflagfixedaspd *removemapflagfixedaspd *getmapflagfixedaspd script command
  8. Upvote
    AnnieRuru got a reaction from Kuroe in Charms   
    1.3 - plugin
    - update to latest revision
    - add nochams mapflag to deny giving item bonus
     
    I don't really know how to do this, because force serial is like ... giving items in bulk immediately
    getitem 909, 5; ... click on this will give 5 in 1 set, click repeatedly will give multiple sets
    if getitem 909, 9; means have to give 5+4 charms, giving 2 times bonus ?
    because the item stack actually means, giving multiple bonuses ...
     
    EDIT:
    I think I'm starting to get it, its the same as having 30000 MAX_AMOUNT in the inventory (MAX_AMOUNT = defined in mmo.h)
    if player having 35000 amount, it automatically split into 30000 and 5000, giving twice the bonus
    so instead of having MAX_AMOUNT 30000, add another field Charm_Max_Stack to have a maximum stack 5, which can be configurable
  9. Upvote
    AnnieRuru got a reaction from Kuroe in movespeed mapflag   
    1.2 - plugin
    - update to latest revision
    - add GM level bypass restriction
    - add *setmapflagmovespeed *removemapflagmovespeed *getmapflagmovespeed script command
  10. Like
    AnnieRuru got a reaction from Zeca in noinvitation mapflag   
    1.1 - plugin
    - update to latest revision
    - add gm_level_bypass
    @evilpuncker
  11. Upvote
    AnnieRuru got a reaction from Kuroe in noitem plugin   
    1.8 - plugin
    - fix duplicate entry by ShowWarning
    - add missing IT_AMMO item type deny
  12. Upvote
    AnnieRuru got a reaction from MikZ in fixedaspd mapflag   
    1.2 - plugin
    - update to latest revision
    - add GM level bypass restriction
    - add *setmapflagfixedaspd *removemapflagfixedaspd *getmapflagfixedaspd script command
  13. Upvote
    AnnieRuru got a reaction from MikZ in movespeed mapflag   
    1.2 - plugin
    - update to latest revision
    - add GM level bypass restriction
    - add *setmapflagmovespeed *removemapflagmovespeed *getmapflagmovespeed script command
  14. Upvote
    AnnieRuru got a reaction from MikZ in Daily random supplies   
    https://rathena.org/board/topic/114244-andro-for-athena/
    the latest AndRO is 20171227, and the new quest log is only for 2018-03-07b onward
    use old school method then
    https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/daily supply/daily_supply_0.3.txt
     
    20180621 is the default version rathena is using right now, so I guess its stable
  15. Upvote
    AnnieRuru got a reaction from MikZ in Sample Questlog & Achievement script   
    the new quest log window is only for 2018-03-07b onward, so if your client is not so up to date, can use version 0.3 ...
    nope, that is just some information when I brainstorming some quest idea
    about Dastgir's idea that add custom quest in Any tab, I'm thinking not going for it,
    because I'm thinking of integrate this with achievement system ...
    using such old client version also means you can't use more modern features
  16. Upvote
    AnnieRuru reacted to Functor in noitem plugin   
    @AnnieRuru You forgot about VECTOR_CLEAR.
  17. Upvote
    AnnieRuru reacted to 4144 in noitem plugin   
    yes look like missing cleanup on server stop and on logout.
    Because vector is not array but some kind of custom type with pointer, it should be cleaned manually
  18. Upvote
    AnnieRuru got a reaction from fiction in ITEML function   
    Credits goes to Cydh and members at opencore
    Download : 1.1
    script
     
    item link system, shift-click on the item to display the item description
    thanks to Cydh posting the topic, I also get a crack on the formula,
    although this is a script function ... well not a script command like cydh did ... but I guess it also gets the job done
     
    F_ITEML( <ItemID>{, <refine>{, <card1>, <card2>, <card3>, <card4>{, <item option ID>, <item option value>, <item option param> }}} );
    prontera,155,180,5 script final test 1_F_MARIA,{ // getnameditem 501, getcharid(0); npctalk F_ITEML(501); npctalk F_ITEML(1201); npctalk F_ITEML(5083); npctalk F_ITEML(19543); npctalk F_ITEML(501, 0, 254, 0, getcharid(CHAR_ID_CHAR) & 65535, getcharid(CHAR_ID_CHAR) >> 16); consolemes CONSOLEMES_INFO, F_ITEML(501, 0, 254, 0, getcharid(CHAR_ID_CHAR) & 65535, getcharid(CHAR_ID_CHAR) >> 16); npctalk F_ITEML(1501, 13); npctalk F_ITEML(1501, 13, 4001, 4002, 4003, 4004); npctalk F_ITEML(5083, 0, 4001,4001,4001,4001, 1,2000,0); npctalk F_ITEML(5083, 0, 4001,4001,4001,4001, VAR_ATTPOWER,2000,0); setarray .@opt_id, VAR_MAXHPAMOUNT, VAR_MAXSPAMOUNT; setarray .@opt_value, 2000, 2000; // setarray .@opt_param, 0, 0; npctalk F_ITEML(5083, 0, 4001,4001,4001,4001, .@opt_id, .@opt_value, .@opt_param); // consolemes CONSOLEMES_INFO, F_ITEML(5083, 0, 4001,4001,4001,4001, .@opt_id, .@opt_value, .@opt_param); end; }  
  19. Upvote
    AnnieRuru got a reaction from fiction in Q> about setunitdata   
    that's why I keep saying hercules mob controller is utterly broken
    there are 2 problems here
    1. the hp and max hp is very strange thing
    when you want to increase the monster hp, setunitdata UDT_MAXHP 1st, then UDT_HP later
    when you want to decrease the monster hp, setunitdata UDT_HP 1st, then UDT_MAXHP later
    I'm not even sure need to fix this or not, because rathena also doing this way
    2. yes, our recalculate monster status are broken
    https://github.com/HerculesWS/Hercules/pull/2408
    prontera,155,185,5 script askdaksd 1_F_MARIA,{ .@mobgid = monster( "this", -1,-1, "--ja--", PORING, 1 ); setunitdata .@mobgid, UDT_MAXHP, 1000000; setunitdata .@mobgid, UDT_HP, 1000000; setunitdata .@mobgid, UDT_LEVEL, 99; end; }  
  20. Upvote
    AnnieRuru got a reaction from Tio Akima in custom card code   
    no.1, my 1st impression is run status_calc_pc everytime player receive hits or healing, which will be server resources heavy
    OnPCStatCalcEvent already deem very resource heavy, and you want to make this heavier LOL
     
    no.2, even I want to write this for fun
    when player login, sd->battle_status.max_hp is 0, and can cause server crash
    when I changed to sd->status.max_hp, that is the player's base hp, if the player have bMaxHP bonus then it will calculate wrongly
    EDIT: some minor trick to calculate division by 1 instead of 0, kinda hacky
     
    no
    not recommend
    EDIT2: but if you want the bonus only at certain HP threshold like only activate below 15% hp, then it might be more ... practical
  21. Upvote
    AnnieRuru got a reaction from Kuroe in noitem plugin   
    1.6 - plugin
    --- fix server crash on certain compiler
    thanks to @Kuroe for reporting
  22. Upvote
    AnnieRuru got a reaction from MikZ in @die delay on hit   
    almost similar to this
     
    #include "common/hercules.h" #include "map/pc.h" #include "map/atcommand.h" #include "common/timer.h" #include "common/memmgr.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "die_delay", SERVER_TYPE_MAP, "x_O", HPM_VERSION, }; ACMD(kill) { if ( DIFF_TICK( timer->gettick(), sd->canlog_tick ) < battle->bc->prevent_logout ) { char msg[CHAT_SIZE_MAX]; safesnprintf( msg, CHAT_SIZE_MAX, "There is a %d seconds delay of using this command to kill the character again", battle->bc->prevent_logout /1000 ); clif->message( fd, msg ); return false; } status_kill( &sd->bl ); clif->message( sd->fd, msg_fd( fd, 13 )); // A pity! You've died. if ( fd != sd->fd ) clif->message( fd, msg_fd( fd, 14 )); // Character killed. return true; } HPExport void plugin_init (void) { addAtcommand( "kill", kill ); } this assume your prevent_logout in your battle_config has default setting
    // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 // When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3) // Official servers prevent players from logging out after attacking, casting skills, and taking damage. // 0 = Players can always logout // 1 = Prevent logout on login // 2 = Prevent logout after attacking // 4 = Prevent logout after casting skill // 8 = Prevent logout after being hit prevent_logout_trigger: 14 prevent_logout_trigger have to at least has 2+8
  23. Upvote
    AnnieRuru got a reaction from MikZ in Daily random supplies   
    erm ... its getting interestingly ... complexity ...
  24. Upvote
    AnnieRuru got a reaction from MikZ in Daily random supplies   
    https://github.com/AnnieRuru/Release/blob/master/Guides/Daily Quest - use gettimetick(2) or gettimestr.md
    function script timeleft__ { .@left = getarg(0); if ( .@left <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return sprintf( _$( "%d day %d hour" ), .@day, .@hour ); else if ( .@hour ) return sprintf( _$( "%d hour %d min" ), .@hour, .@min ); else if ( .@min ) return sprintf( _$( "%d min %d sec" ), .@min, .@sec ); else return sprintf( _$( "%d sec" ), .@sec ); } prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ .@today = atoi( gettimestr( "%Y%m%d", 9 ) ); if ( #daily_supply == .@today ) { mes "You have already taken today's supply"; mesf "You have to wait %s countdown to get next supply", timeleft__( getcalendartime(0,0) - gettimetick(2) ); close; } getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); #daily_supply = .@today; end; }
  25. Upvote
    AnnieRuru got a reaction from MikZ in Daily random supplies   
    curious, why all 3 sets have same item ID ?
    so it means they can be repeated ?
     
    prontera,155,185,5 script kjdsfhskhf 1_F_MARIA,{ getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(1,10); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(5,15); getitem F_Rand( 656, 657, 505, 645, 506, 14510 ), rand(10,20); end; }  
×
×
  • Create New...

Important Information

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