Jump to content

skyundersea

Members
  • Content Count

    39
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    skyundersea reacted to AnnieRuru in [Request] Custom Item Script   
    not very satisfy with my previous attempt, so redo again with *hateffect
    #include "common/hercules.h" #include "map/pc.h" #include "map/battle.h" #include "common/timer.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "pk_showeffect", SERVER_TYPE_MAP, "0.2", HPM_VERSION, }; int hateffect_timerid = INVALID_TIMER; int hateffect_countdown( int tid, int64 tick, int id, intptr data ) { struct map_session_data *sd = map->id2sd(id); if ( sd != NULL ) clif->hat_effect_single( &sd->bl, 27, false ); hateffect_timerid = INVALID_TIMER; return 0; } int battle_check_target_post( int retVal, struct block_list *src, struct block_list *target, int flag ) { struct block_list *s_bl = src, *t_bl = target; if ( (t_bl = battle->get_master(target)) == NULL ) t_bl = target; if ( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; if ( s_bl->type == BL_PC && t_bl->type == BL_PC && (flag & BCT_ENEMY) == BCT_ENEMY && retVal == 1 ) { if ( hateffect_timerid != INVALID_TIMER ) { timer->delete( hateffect_timerid, hateffect_countdown ); hateffect_timerid = INVALID_TIMER; } hateffect_timerid = timer->add( timer->gettick() + battle->bc->prevent_logout, hateffect_countdown, ((struct map_session_data*)s_bl)->bl.id, 0 ); clif->hat_effect_single( s_bl, 27, true ); } return retVal; } HPExport void plugin_init (void) { addHookPost( battle, check_target, battle_check_target_post ); }  
  2. Upvote
    skyundersea reacted to AnnieRuru 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
  3. Upvote
    skyundersea reacted to AnnieRuru 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
  4. Upvote
    skyundersea reacted to 4144 in Stable packet   
    yes you can or any other version
    Ragexe is stable kro clients,
    RagexeRE is testing kro clients,
    Ragexe_zero is zero clients
  5. Upvote
    skyundersea reacted to 4144 in Stable packet   
    From server side most or all versions should works. Older than 2017 may have some issues and need test for each client)
    From client side, clients itself works fine, but in some can be issues. And more important not all clients may works patches what you need. Check patches what you need on http://nemo.herc.ws/clients/
    On other emulators popular version 2018-06-21, because this emulators not support newer version. But in hercules you can use any new version too.
  6. Upvote
    skyundersea reacted to banhelba2019 in Outfits and Cashmount   
    no unfortunately i cant test it without downloading a bunch of stuff, but ive looked over it and thats the only thing i can see anyways
    try deleting that entire block i mentioned
    if its job related i have no idea
    few other things :
     
    sc_config.txt
    // Unremovable SC_WEIGHTOVER50, 207 SC_WEIGHTOVER90, 207 SC_WEDDING, 77 SC_XMAS, 77 SC_SUMMER, 77 SC_NOCHAT, 205 SC_FUSION, 77 thats probably 64 + 8 + 4 + 1 or something but doubt it matters
     
    sorry, but youve given me a sweet idea though 
  7. Upvote
    skyundersea reacted to AnnieRuru in Portal Skill   
    message script command obviously doesn't work ...
    if the player not within the vicinity when the player cast the portal, they can only see the portal, not the message
    that's why chat-room might be the only choice to show it like a signboard, that can move into any location, and remove anytime

    if you don't want to show npc name, make the npc name like #asdf, any characters after # will hide the npc name
    but making an npc that you can't click on it, impossible
    in fact, I don't know any object that can control server side that will pop up an object on the client that you can't click on it
    enum bl_type { BL_NUL = 0x000, BL_PC = 0x001, BL_MOB = 0x002, BL_PET = 0x004, BL_HOM = 0x008, BL_MER = 0x010, BL_ITEM = 0x020, BL_SKILL = 0x040, BL_NPC = 0x080, BL_CHAT = 0x100, BL_ELEM = 0x200, BL_ALL = 0xFFF, }; yup, none, all these objects will change the cursor
  8. Upvote
    skyundersea reacted to AnnieRuru in Disable Item Drop 0.00%   
    1. place mf_nomobloot and mf_nomvploot mapflags on all maps
    or
    2. change this condition into if(0) in mob_dead function
    if( !(type&1) && !map->list[m].flag.nomobloot && !md->state.rebirth && ( md->special_state.ai == AI_NONE || //Non special mob battle_config.alchemist_summon_reward == 2 || //All summoned give drops (md->special_state.ai == AI_SPHERE && battle_config.alchemist_summon_reward == 1) //Marine Sphere Drops items. ) ) { // Item Drop  
    btw you shouldn't change the rate if you want to give away via scripts
    there is a script command *getmobdrops , the rates are affected by that battle config
  9. Upvote
    skyundersea reacted to AnnieRuru in Portal Skill   
    no.1 ... wait until I fix OnPCUseSkillEvent
    that modification allows to manipulate everything with a skill cursor ....
     
    no.2
    you mean like adding 3D object into the game without telling player that object is manipulate from server side ?
    none, perhaps you can try with browedit if you want to customize the map
  10. Upvote
    skyundersea reacted to AnnieRuru in Portal Skill   
    I don't understand what topic request talking about
    if anyone understand this topic, please help me rephrase his/her sentence
  11. Upvote
    skyundersea reacted to Dastgir in Portal Skill   
    Those warp are static or generated via script and changes location?
    If they are meant to be static, you can use newer client feature named (signboard) and just link to those warp co ordinates.
  12. Upvote
    skyundersea reacted to AnnieRuru in Portal Skill   
    although I want to say impossible ...
    but I can think of 1 work around ...
    use duplicatenpc modification ...
    create a chat-room on the duplicate npc ...
    chatroom title... generate from data/mapnametable.txt ...
  13. Upvote
    skyundersea reacted to AnnieRuru in Portal Skill   
    if you mean like event script, that waitingroom can be open/close, that warp player to event map when its open
    prontera,158,185,5 script jdshfjsdfh 1_F_MARIA,{ if ( .start ) mes "The event is OPEN"; else mes "The event is CLOSED"; close; OnInit: bindatcmd "asdf", strnpcinfo(NPC_NAME)+"::Onaaa"; waitingroom "Event", 0; end; Onaaa: .start ^= 1; delwaitingroom strnpcinfo(NPC_NAME); if ( .start ) waitingroom "Event", 2, strnpcinfo(NPC_NAME)+"::Onstart", 1; else waitingroom "Event", 0; end; Onstart: getwaitingroomstate 0; unitwarp $@chatmembers[0], "guild_vs2", 49,49; end; }  
    however if it is for player, I have absolutely no idea what your point is ...
    PS: I think ... like I have to fix my OnPCUseSKillEvent ....
  14. Upvote
    skyundersea reacted to AnnieRuru in [Help] Rebirth Script   
    StatusPoint += 1000; it seems you forgot to add jobchange into novice high
    and no need to resetstatus if your resetlvl is type 1
  15. Upvote
    skyundersea reacted to AnnieRuru in [Help] Skill change and Job Sprite   
    "@bodystyle 1" ... only 3rd job having 2nd sprite
     
    https://github.com/HerculesWS/Hercules/blob/stable/conf/char/char-server.conf#L107-L118
     
    and no idea what you mean in the 1st question
  16. Upvote
    skyundersea reacted to utofaery in [Help] Skill change and Job Sprite   
    Hercules\conf\char\char-server.conf
    // Player-related configuration player: { new: { // Start point (Renewal) start_point_re: { map: "iz_int" x: 18 y: 27 } // Start point (Pre-Renewal) start_point_pre: { map: "new_1-1" x: 53 y: 111 }  
×
×
  • Create New...

Important Information

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