Jump to content
  • 0
Sign in to follow this  
utofaery

About sanctuary, plugins, inventory, partyname showing, clone vs emperium

Question


1. how to make it not list clone monster? or slaveclone?

Spoiler

-    script    BmapMobList    -1,{
OnInit:
    bindatcmd "mapmoblist2", strnpcinfo(0)+"::Onaaa";
    end;
Onaaa:
    if ( .@atcmd_numparameters ) {
        if ( getmapusers(.@atcmd_parameters$) == -1 ) {
            dispbottom "Map not exist";
            end;
        }
        .@map$ = .@atcmd_parameters$;
    }
    else
        .@map$ = strcharinfo(3);
    .@size = getunits( BL_MOB, .@bl, false, .@map$ );
    freeloop true;
    for ( .@i = 0; .@i < .@size; ++.@i ) {
        .@string$ = rid2name(.@bl[.@i]);
        if ( !getd(".@"+ .@string$) ) {
            .@mobname$[.@c] = .@string$;
            getmapxy .@map$, .@x, .@y, UNITTYPE_MOB, .@bl[.@i];
            .@mobx[.@c] = .@x;
            .@moby[.@c] = .@y;
            .@mobhp[.@c] = getunitdata( .@bl[.@i], UDT_HP );
            .@mobmaxhp[.@c] = getunitdata( .@bl[.@i], UDT_MAXHP );
            ++.@c;
        }
        setd ".@"+ .@string$, getd(".@"+ .@string$) +1;
    }
    dispbottom " === These are monsters in "+ .@map$ +" ===";
    for ( .@i = 0; .@i < .@c; ++.@i )
        if ( getd(".@"+ .@mobname$[.@i]) )
            dispbottom ( ++.@j )+". "+ .@mobname$[.@i] +" : "+ getd(".@"+ .@mobname$[.@i])+"x";
    if ( getgmlevel() < 99 ) end; // Hercules doesn't catch dead monsters as being alive
    dispbottom " === Location of unique monsters === ";
    for ( .@i = 0; .@i < .@c; ++.@i )
        if ( getd(".@"+ .@mobname$[.@i]) == 1 )
            dispbottom .@mobname$[.@i] +" --> X = "+ .@mobx[.@i] +" Y = "+ .@moby[.@i] +" | Hp left = "+ .@mobhp[.@i] +"/"+ .@mobmaxhp[.@i];
    end;
}

 


2. can it be use as script onPCLogin??
and does this one stop gaining exp from mvp too?
 

Spoiler

#include "common/hercules.h"
#include "map/pc.h"
#include "common/nullpo.h"
#include "plugins/HPMHooking.h"
#include "common/HPMDataCheck.h"

HPExport struct hplugin_info pinfo = {
    "blockexp",
    SERVER_TYPE_MAP,
    "0.1",
    HPM_VERSION,
};

bool pc_authok_post( bool retVal, struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers ) {
    if ( retVal == false )
        return false;
    if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) == true )
        clif->message( sd->fd, "@blockexp turn ON." );
    return true;
}

bool pc_gainexp_pre( struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest ) {
    nullpo_ret(*sd);
    if ( *src == NULL && pc_readglobalreg( *sd, script->add_variable("blockexp") ) == true )
        *base_exp = 0;
    return true;
}

void pc_calcexp_post( struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src ) {
    if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) == true )
        *base_exp = 0;
    return;
}

ACMD(blockexp) {
    if ( pc_readglobalreg( sd, script->add_variable("blockexp") ) ) {
        clif->message( sd->fd, "@blockexp turn OFF." );
        pc_setglobalreg( sd, script->add_variable("blockexp"), false );
    }
    else {
        clif->message( sd->fd, "@blockexp turn ON." );
        pc_setglobalreg( sd, script->add_variable("blockexp"), true );
    }
    return true;
}

HPExport void plugin_init(void) {
    addHookPre( pc, gainexp, pc_gainexp_pre );
    addHookPost( pc, calcexp, pc_calcexp_post );
    addAtcommand( "blockexp", blockexp );
}

 

3. is there a way to sort inventory item ?? be it by item id or item name (ascending sort) ?


4 how to make sanctuary only heal allies ( party guild and slave clone ) but not enemies ( anything that is hostile to player )


5 clone or slave clone or evil clone can kill emperium how do I prevent this happen?  when player are not in guild..


6 why is it only when player are in guild it shows your party and when player are not in guild not showing party name???

 

7.  can we combine multiple plugins into one file ??

What my plugin way is edit >> plugin-sample.vcxproj  search for word sample replace with PluginName then save as  plugin-PluginName.vcxproj

then add existing project in visual studio and compile which resulting in multiple folder in vcproj-15 with various sizes of multiple file

so the end question is can I combine different multiple plugins into one file??

 

Edited by utofaery
update topic name

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

usually I closed 1 eye when ask only about 2-3 questions in 1 topic
but this topic has 7 questions, means this topic actually breaks the rule for having some question posted in wrong section

open 1 topic per 1 question

follow the forum guidelines when you post a topic
http://herc.ws/board/guidelines/

 

topic close

PS: you can go ahead and make 7 topics for it, it is actually better that way

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

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