Jump to content

utofaery

Members
  • Content Count

    101
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by utofaery


  1. 
    prontera,158,167,3	script	Sample	4_M_SIT_NOVICE,{
    
    if (#xTaken + .next_take> gettimetick(2)) {
    	mes "[Random Item Giver]";
    	mes "Please talk to me after 24 hours.";
    	close;
    }
    	else {
    
    	mes "[Random Item Giver]";
    	mes "Have some of these!";
    		.@riRate1 = rand (.@Ai11,.@Ai12);
    		.@riRate2 = rand (.@Ai21,.@Ai22);
    		.@riRate3 = rand (.@Ai31,.@Ai32);
    		.@rItemid1 = .@Aitem1[rand(getarraysize (.@Aitem1))];
    		.@rItemid2 = .@Aitem2[rand(getarraysize (.@Aitem2))];
    		.@rItemid3 = .@Aitem3[rand(getarraysize (.@Aitem3))];
    		getitem ( .@rItemid1, .@riRate1 ) ;
    //		dispbottom ( "rItemid1 :: " + .@rItemid1 + " riRate1 :: " + .@riRate1 + " Name :: " + getitemname ( .@rItemid1 ) ) ; // debug use only !!!
    		getitem ( .@rItemid2, .@riRate2 ) ;
    //		dispbottom ( "rItemid2 :: " + .@rItemid2 + " riRate2 :: " + .@riRate2 + " Name :: " + getitemname ( .@rItemid2 ) ) ; // debug use only !!!
    		getitem ( .@rItemid3, .@riRate3 ) ;
    //		dispbottom ( "rItemid3 :: " + .@rItemid3 + " riRate3 :: " + .@riRate3 + " Name :: " + getitemname ( .@rItemid3 ) ) ; // debug use only !!!
    		#xTaken = gettimetick(2);
    		next;
         	close;
    }
    
    
    OnInit:
    
    	//set cooldown to take item again.
    	.next_take = 24*60*60;
    
    	//set item here
    	setarray .Aitem1[0],501,502,503,504,505,14510; 
    	setarray .Aitem2[0],601,602,603,604,605,14510;
    	setarray .Aitem3[0],701,702,703,704,705,14510;
    	//set rate here
    	.Ai11 = 1;
    	.Ai12 = 10;
    	.Ai21 = 5;
    	.Ai22 = 15;
    	.Ai31 = 10;
    	.Ai32 = 20;
    
    	end;
    }
    

    Refined and fixed up npc variable..


  2. 20 hours ago, skyundersea said:

    also need to know if is possible to add Visual option to manner PK system, when ppl kill someone it show Option i choose!

     

    1 hour ago, AnnieRuru said:

     

    
    prontera,157,180,4	script	Option Master	4_DOG01,{
    	setoption Option_Flying, true;
    	sleep2 1000;
    	setoption Option_Flying, false;
    }

    no idea what's this means

    This should means on PvP enabled map?

    When player A kill player B,

    Show effect xxx on player A.

    But what is "manner"?

    Side note :

    Why can't I delete code box (and content of code box) on Android chrome? 

    And it's same with quote box!


  3. On 2/26/2019 at 3:42 AM, Kyurem said:

     

    When I try to execute some command related to mapcache, I present some errors:

     

    Capturar 2.PNG

    Capturar.PNG

    Lucas I assumed.

     

    Issue :: You have incomplete conf folder. 

    Explaination :: Which means you got something missing from "Hercules/conf/plugins.conf" folder

    Recovery Step :: Re-Clone or Re-Update your hercules installation.  Vital.


  4. 2 hours ago, skyundersea said:

    Thanks for help guys, i wonder if the caster can send message of destination map....

    By script (easier), skill is source (harder).

    make a clone npc at destination with on touch then announce something 

     

    2 hours ago, skyundersea said:

    but i don't even know where to edit the skill, i just know where to edit cost, requeriment and skilltree... this easy things,

    But thanks anyway!!!

    I'll wait if someone who know how to edit skills come here and see if its possible..

    Database support not script anymore!

    anyway~

    any filename that has "skill"

    1. hercules\db\

    2.1  hercules\db\pre-re\

    or

    2.2  hercules\db\re\

    OR

    3  you want customly made stuff ( aka custom skill )

    https://herc.ws/wiki/Adding_new_skills  ( BENEFICIAL read)  ( sorry to make it caps, no people takes reading stuff seriously these days )

     

    2 hours ago, skyundersea said:

    Any help with non targetable visible NPC sprites? Do you guys know?

    Yes we know the good old floating npc which no normal play can click see or OnTouch...

     


  5. 1 hour ago, thanna said:

    Hello Miss Annie.

    Im using Asheraf data folder. Along with sir dastgir's custom quest on event tab. The quest is attached below maam.

    Its reading the questid2display.txt maam along with the quest folder inside luafiles. My eyes burn T_T took me so much time to google and try other lubs.


    Thank you.

    quest.zip

    Bad suggestion: Erm another thing is to try hunting private server (which used 2015) for the "questid2display.txt" 


  6. 1 hour ago, thanna said:

    Thank you in advance. I really need your help 😟

    First thing first

    this line is found on the first page of https://github.com/Asheraf/Translation

    This fork meant to work only for the lastest RagexeRE client release, backward compatibility is not maintained.

    1.

    Thing is if you use 2015 client make sure you get translation package that target 2015 client only not anything 2018 or etc.

    old client need old translation.  so you need to do homework to get translation for 2015 client searching in github.

     

    2.

    or you could use new client with new translation?  which is easier and maintain'ed for current version of client.

     

    3.

    or if you insist to use 2015, then wait for someone to save you ..

     

    Side Note:

     

    Any way this is found in rathena with 1 hour difference..

    same topic same description.

    https://rathena.org/board/topic/118479-quest-log-crash/


  7. Q>what does this warning means

    This happen'd when I tried to do this:

    Map server error:

    Spoiler

    [Warning]: Unexpected type for argument 1. Expected number.
    [Debug]: Data: label pos=3668
    [Debug]: Function: __jump_zero
    [Debug]: Source (NPC): TesterClone#TC01 at prontera (154,174)

    A function call'ed on another npc with getmapflag check...of all mapflag found in constants

    Spoiler

    function    script    F_MFCheck    {

    if ( getmapflag( strcharinfo(PC_MAP), mf_nomemo ) ) { 
            dispbottom ( " Yes mf_nomemo " ) ;
            } else {
            dispbottom ( " Not mf_nomemo " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noteleport ) ) { 
            dispbottom ( " Yes mf_noteleport " ) ;
            } else {
            dispbottom ( " Not mf_noteleport " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nosave ) ) { 
            dispbottom ( " Yes mf_nosave " ) ;
            } else {
            dispbottom ( " Not mf_nosave " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nobranch ) ) { 
            dispbottom ( " Yes mf_nobranch " ) ;
            } else {
            dispbottom ( " Not mf_nobranch " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nopenalty ) ) { 
            dispbottom ( " Yes mf_nopenalty " ) ;
            } else {
            dispbottom ( " Not mf_nopenalty " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nozenypenalty ) ) { 
            dispbottom ( " Yes mf_nozenypenalty " ) ;
            } else {
            dispbottom ( " Not mf_nozenypenalty " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pvp ) ) { 
            dispbottom ( " Yes mf_pvp " ) ;
            } else {
            dispbottom ( " Not mf_pvp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_noparty ) ) { 
            dispbottom ( " Yes mf_pvp_noparty " ) ;
            } else {
            dispbottom ( " Not mf_pvp_noparty " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_noguild ) ) { 
            dispbottom ( " Yes mf_pvp_noguild " ) ;
            } else {
            dispbottom ( " Not mf_pvp_noguild " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_gvg ) ) { 
            dispbottom ( " Yes mf_gvg " ) ;
            } else {
            dispbottom ( " Not mf_gvg " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_noparty ) ) { 
            dispbottom ( " Yes mf_gvg_noparty " ) ;
            } else {
            dispbottom ( " Not mf_gvg_noparty " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_notrade ) ) { 
            dispbottom ( " Yes mf_notrade " ) ;
            } else {
            dispbottom ( " Not mf_notrade " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noskill ) ) { 
            dispbottom ( " Yes mf_noskill " ) ;
            } else {
            dispbottom ( " Not mf_noskill " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nowarp ) ) { 
            dispbottom ( " Yes mf_nowarp " ) ;
            } else {
            dispbottom ( " Not mf_nowarp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_partylock ) ) { 
            dispbottom ( " Yes mf_partylock " ) ;
            } else {
            dispbottom ( " Not mf_partylock " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noicewall ) ) { 
            dispbottom ( " Yes mf_noicewall " ) ;
            } else {
            dispbottom ( " Not mf_noicewall " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_snow ) ) { 
            dispbottom ( " Yes mf_snow " ) ;
            } else {
            dispbottom ( " Not mf_snow " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_fog ) ) { 
            dispbottom ( " Yes mf_fog " ) ;
            } else {
            dispbottom ( " Not mf_fog " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_sakura ) ) { 
            dispbottom ( " Yes mf_sakura " ) ;
            } else {
            dispbottom ( " Not mf_sakura " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_leaves ) ) { 
            dispbottom ( " Yes mf_leaves " ) ;
            } else {
            dispbottom ( " Not mf_leaves " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_clouds ) ) { 
            dispbottom ( " Yes mf_clouds " ) ;
            } else {
            dispbottom ( " Not mf_clouds " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_clouds2 ) ) { 
            dispbottom ( " Yes mf_clouds2 " ) ;
            } else {
            dispbottom ( " Not mf_clouds2 " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_fireworks ) ) { 
            dispbottom ( " Yes mf_fireworks " ) ;
            } else {
            dispbottom ( " Not mf_fireworks " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_castle ) ) { 
            dispbottom ( " Yes mf_gvg_castle " ) ;
            } else {
            dispbottom ( " Not mf_gvg_castle " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_gvg_dungeon ) ) { 
            dispbottom ( " Yes mf_gvg_dungeon " ) ;
            } else {
            dispbottom ( " Not mf_gvg_dungeon " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nightenabled ) ) { 
            dispbottom ( " Yes mf_nightenabled " ) ;
            } else {
            dispbottom ( " Not mf_nightenabled " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nobaseexp ) ) { 
            dispbottom ( " Yes mf_nobaseexp " ) ;
            } else {
            dispbottom ( " Not mf_nobaseexp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nojobexp ) ) { 
            dispbottom ( " Yes mf_nojobexp " ) ;
            } else {
            dispbottom ( " Not mf_nojobexp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nomobloot ) ) { 
            dispbottom ( " Yes mf_nomobloot " ) ;
            } else {
            dispbottom ( " Not mf_nomobloot " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nomvploot ) ) { 
            dispbottom ( " Yes mf_nomvploot " ) ;
            } else {
            dispbottom ( " Not mf_nomvploot " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noreturn ) ) { 
            dispbottom ( " Yes mf_noreturn " ) ;
            } else {
            dispbottom ( " Not mf_noreturn " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nowarpto ) ) { 
            dispbottom ( " Yes mf_nowarpto " ) ;
            } else {
            dispbottom ( " Not mf_nowarpto " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nightmaredrop ) ) { 
            dispbottom ( " Yes mf_nightmaredrop " ) ;
            } else {
            dispbottom ( " Not mf_nightmaredrop " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_zone ) ) { 
            dispbottom ( " Yes mf_zone " ) ;
            } else {
            dispbottom ( " Not mf_zone " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nocommand ) ) { 
            dispbottom ( " Yes mf_nocommand " ) ;
            } else {
            dispbottom ( " Not mf_nocommand " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nodrop ) ) { 
            dispbottom ( " Yes mf_nodrop " ) ;
            } else {
            dispbottom ( " Not mf_nodrop " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_jexp ) ) { 
            dispbottom ( " Yes mf_jexp " ) ;
            } else {
            dispbottom ( " Not mf_jexp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_bexp ) ) { 
            dispbottom ( " Yes mf_bexp " ) ;
            } else {
            dispbottom ( " Not mf_bexp " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_novending ) ) { 
            dispbottom ( " Yes mf_novending " ) ;
            } else {
            dispbottom ( " Not mf_novending " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_loadevent ) ) { 
            dispbottom ( " Yes mf_loadevent " ) ;
            } else {
            dispbottom ( " Not mf_loadevent " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nochat ) ) { 
            dispbottom ( " Yes mf_nochat " ) ;
            } else {
            dispbottom ( " Not mf_nochat " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noexppenalty ) ) { 
            dispbottom ( " Yes mf_noexppenalty " ) ;
            } else {
            dispbottom ( " Not mf_noexppenalty " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_guildlock ) ) { 
            dispbottom ( " Yes mf_guildlock " ) ;
            } else {
            dispbottom ( " Not mf_guildlock " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_town ) ) { 
            dispbottom ( " Yes mf_town " ) ;
            } else {
            dispbottom ( " Not mf_town " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_autotrade ) ) { 
            dispbottom ( " Yes mf_autotrade " ) ;
            } else {
            dispbottom ( " Not mf_autotrade " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_allowks ) ) { 
            dispbottom ( " Yes mf_allowks " ) ;
            } else {
            dispbottom ( " Not mf_allowks " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_monster_noteleport ) ) { 
            dispbottom ( " Yes mf_monster_noteleport " ) ;
            } else {
            dispbottom ( " Not mf_monster_noteleport " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pvp_nocalcrank ) ) { 
            dispbottom ( " Yes mf_pvp_nocalcrank " ) ;
            } else {
            dispbottom ( " Not mf_pvp_nocalcrank " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_battleground ) ) { 
            dispbottom ( " Yes mf_battleground " ) ;
            } else {
            dispbottom ( " Not mf_battleground " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_reset ) ) { 
            dispbottom ( " Yes mf_reset " ) ;
            } else {
            dispbottom ( " Not mf_reset " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_notomb ) ) { 
            dispbottom ( " Yes mf_notomb " ) ;
            } else {
            dispbottom ( " Not mf_notomb " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_nocashshop ) ) { 
            dispbottom ( " Yes mf_nocashshop " ) ;
            } else {
            dispbottom ( " Not mf_nocashshop " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noautoloot ) ) { 
            dispbottom ( " Yes mf_noautoloot " ) ;
            } else {
            dispbottom ( " Not mf_noautoloot " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_noviewid ) ) { 
            dispbottom ( " Yes mf_noviewid " ) ;
            } else {
            dispbottom ( " Not mf_noviewid " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pairship_startable ) ) { 
            dispbottom ( " Yes mf_pairship_startable " ) ;
            } else {
            dispbottom ( " Not mf_pairship_startable " ) ;
    }
    if ( getmapflag( strcharinfo(PC_MAP), mf_pairship_endable ) ) { 
            dispbottom ( " Yes mf_pairship_endable " ) ;
            } else {
            dispbottom ( " Not mf_pairship_endable " ) ;
    }

    return;
    }


  8. 7 hours ago, skyundersea said:

    Do you know here i can change starting map location?

    Cuz they are starting at iz_int 90 98,

    i wanted another place for starting map, is this possible?

    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
    			}

     


  9. 14 hours ago, AnnieRuru said:

    yes ...

    ... of course not recommend
    its better to have multiple plugins to track your progress in your server

    that's the reason most of the time why rathena members doesn't want to upgrade their server to the latest revision
    because once they have bought a source modification, they couldn't upkeep it (don't have src knowledge), and so they stuck their revision ....
    .... and eventually their server became so outdated and have to do a server wipe

    if you just having a single plugin, once the plugin break, you will wonder where the error come from, because it will have over thousand of lines

    From this file :

    plugin-sample.vcxproj

    can it be modified to load multiple .c file?

    as in 

    mapcache.c

    customplugin1.c .... etc

    inside one

    plugin-sample.vcxproj?

     

     

    The reason to mash up plugin ==> SSD is hyper expensive storage option... compare to HDD 


  10. 15 hours ago, AnnieRuru said:

    1st, UDT_CLASS is expected to change some time soon, a PR is already addressing this issue
    https://github.com/HerculesWS/Hercules/pull/2382

    2nd, we missing a script command to read a line from conf/message.conf

    and yes, its better to open multiple topic ...

    1.  What to change if this occur?

    2.  can that be created??  somehow?

    3.  On the pass some forum restrict people from flooding topic in forum...which is something I faced before so ... the reason I did mashup topic.

    this forum encourage flooding then??


  11. 16 hours ago, AnnieRuru said:
    
    	.GRDelayMin = (1/10);
    	.MaxGRLimit = 1000;
    	'GRRate = 5;
    	'MOB1ID = 1002;
    	'MOB2ID = 1113;
    	'MOB1AM = 40;
    	'MOB2AM = 35;
    	'MobTOTAL = 'MOB1AM+'MOB2AM;

    as you can see, .GRDelayMin and .MaxGRLimit is npc variable
    in this script, means even you have reach the hunt limit, it still generate the instance,
    that's why you get the weird instance behavior

    you should stop generate the instance when player already hunt enough gold

    1.  ok what should be changed to fix that??

    should I change that variable to instance variable??

    or should it be player temporary variable??  whenever player starts the instance by talking to the npc?

    this instance script need to chew upon to understand.

     

    2.  The cases is that in that particular instance it runs till killed monster 75 or 77 then it terminates or randomly terminate.


  12. prontera,150,180,5	script	Instance Challenger	4_M_EINMINER,{
    	mes ( " Big sun Big day ! " ) ;
    	dispbottom ( " #GRRoomDelay :: " + #GRRoomDelay ) ;
    	switch ( select( 
    		"~ Create Instance",
    		"~ Exit.",
    		"~ Clear Instance"
    		)){ 
    	case 3:
    		instance_destroy( );//.@instance );
    		close;
    	case 1:
    		.@mapname$ = "1@dth1";
    		#GRHunt = 0;
    		if( #GRRoomDelay > gettimetick(2) ) {
    			.last = #GRRoomDelay - gettimetick(2);
    			.@min = .last % ( 24 * 3600 ) % 3600 / (60);
    			mes "Wait for ^FF0000"+.@min+" Minutes^000000.";
    			close;
    		}
    
    		.@instance = instance_create( .@Zone4$, getcharid( 3 ), IOT_CHAR);
    		if( .@instance < 0 ) { 
    			dispbottom "Instance Failed.";
    			close;
    		}
    		dispbottom "" + .@mapname$ + "- Attempting to create Farm Instance.";
    		if( instance_attachmap("1@dth1",.@instance) == "" ) {
    			instance_destroy( .@instance );
    			dispbottom "Failed to instance 1@dth1";
    			end;
    		}
    
    			dispbottom "" + .@Zone4$ + " attempt successful on Instance attach!";
    			instance_set_timeout( 3600, 300, .@instance );
    			instance_init( .@instance );
    			instance_attach .@instance;
    			'cid = getcharid(0);
    			'aid = getcharid(3);
    			FarmIns_cooldown = gettimetick(2) + 3600; // 1 hour cooldown
    			warp instance_mapname("1@dth1",.@instance),166,130;
    			end;
    	case 2:
    		close;
    		end;
    	}
    	close;
    }
    
    //=====================================================
    /*
    			
    			[Farm Zone] Gold Room
    			Information/How-To Setup:
    			
    			'GRRate - The rate at which they obtain Gold, which is in %. So 50 = 50%.
    			.GRDelayMin - Controls Time Limit of Re-entering: 1 = 1 Minute, 2 = 2 Minute, etc.
    			.MaxGRLimit - Max amount of Gold they can Farm until instance is complete, if they don't reach max amount they just complete the instance.
    			'MOB1ID/MOB2ID - Select the ID of the monster you want.
    			'MOB1AM/MOB2AM - Select the Amount of designated Monsters you want to spawn.
    			NOTE: Don't make the .MaxGRLimit exceed the total amount of monsters you selected to spawn. Otherwise, they will never reach the Max Limit.
    			All other variables do not touch, especially the Count, and the Start. ('Farm_Count and 'Farm_Start)
    		
    			
    */
    //=====================================================
    1@dth1,28,23,1	script	IxGR#Ins	FAKE_NPC,{
    
    OnInstanceInit:
    	.GRDelayMin = (1/10);
    	.MaxGRLimit = 1000;
    	'GRRate = 5;
    	'MOB1ID = 1002;
    	'MOB2ID = 1113;
    	'MOB1AM = 40;
    	'MOB2AM = 35;
    	'MobTOTAL = 'MOB1AM+'MOB2AM;
    
    	'Farm_Count = 0;
    	'Farm_Start = 0;
    
    	if (!'Farm_Start) {
    		donpcevent instance_npcname("IxGR#Ins")+"::OnGRFarmStart";
    		'Farm_Start++;
    		end;
    	}
    OnGRFarmStart:
    	//instance_announce -1,"[Farming Instance] Enjoy farming some Gold!",bc_map;
    	monster instance_mapname("1@dth1"),0,0,"[ Farm Zone ] Gold Holder",'MOB1ID,'MOB1AM,instance_npcname("IxGR#Ins")+"::OnFarmGR";
    	monster instance_mapname("1@dth1"),0,0,"[ Farm Zone ] Gold Guest",'MOB2ID,'MOB2AM,instance_npcname("IxGR#Ins")+"::OnFarmGR";
    	end;
    OnFarmGR:
    	'dMon = killedrid;
    if ( #GRHunt >= .MaxGRLimit )
    		{
    			dispbottom "[ Farm Zone ] : You are trying to abuse Farm Zone! Prematurely ending.";
    			sleep2 500;
    			#GRRoomDelay = gettimetick(2) + ( .GRDelayMin * 60 );
    			#GRHunt = 0;
    			warp "prontera",150,185;
    			instance_destroy();
    			end;
    		}
    
    	monster instance_mapname("1@dth1"),0,0,"[ Farm Zone ] Gold Holder",'dMon,'MOB1AM,instance_npcname("IxGR#Ins")+"::OnFarmGR";
    
    	if ( rand(100) < 'GRRate ) {
    		#GRHunt++;
    		'Farm_Count++;
    		dispbottom "[ Farm Zone ] : Farmed "+#GRHunt+" / "+.MaxGRLimit+" Gold.";
    		if( #GRHunt >= .MaxGRLimit ) {
    			getitem 969, 1;
    			message strcharinfo(0),"Limit Reach , you may join again later.";
    			sleep2 500;
    			#GRRoomDelay = gettimetick(2) + ( .GRDelayMin * 60 );
    			warp "prontera",150,150;
    			instance_destroy();
    			end;
    		}
    		getitem 969, 1;
    		dispbottom ( " Current farm Count :: " + 'Farm_Count + "  Hunted Gold Count :: " + #GRHunt ) ;
    		donpcevent instance_npcname("IxGR#Ins")+"::OnGRFarmCount";
    	} else {
    		'Farm_Count++;
    		dispbottom ( " Current farm Count :: " + 'Farm_Count + "  Hunted Gold Count :: " + #GRHunt ) ;
    		donpcevent instance_npcname("IxGR#Ins")+"::OnGRFarmCount";
    		end;
    	}
    		end;
    OnGRFarmCount:
    	if ('Farm_Count >= 'MobTOTAL) { // modified >> .MaxGRLimit <<
    
    		if( attachrid('aid) )
    			if( getcharid(0) == 'cid ) {
    				instance_announce -1,"[Farming Instance] Farming instance Completed.",bc_map;
    				 #GRRoomDelay = gettimetick(2) + ( .GRDelayMin * 60 );
    				sleep2 5000;
    				instance_destroy();
    				end;
    			}
    			else
    				end;
    	}
    }

    1.

    I was borrowing instance script ( Forgot where I collected this script from but it's from herc.ws)

    but it's always randomly terminate by this line:

    dispbottom "[ Farm Zone ] : You are trying to abuse Farm Zone! Prematurely ending.";

    or some time randomly terminate.

     

    2.

    the script is suppose to let you player to kill 1000 mobs with repeated spawning of dead mobs but it's working randomly because of random termination of instance.

     

     


  13. On 2/25/2019 at 4:01 AM, AnnieRuru said:

    no.1 . actually you are right, I reproduce your problem ....

      Reveal hidden contents

    guardian spawn once, remove once, spawn once ...

    
    
    prontera,155,185,5	script	asdasd	1_F_MARIA,{
    	end;
    OnGuardianSpawn:
    	for ( .@i = 0; .@i < 20; ++.@i ) {
    		if ( getcastledata( .castle$[.@i], 1 ) ) {
    			setcastledata( .castle$[.@i], 10, 1 );
    			setcastledata( .castle$[.@i], 11, 1 );
    			setcastledata( .castle$[.@i], 12, 1 );
    			setcastledata( .castle$[.@i], 13, 1 );
    			setcastledata( .castle$[.@i], 14, 1 );
    			setcastledata( .castle$[.@i], 15, 1 );
    			setcastledata( .castle$[.@i], 16, 1 );
    			setcastledata( .castle$[.@i], 17, 1 );
    //	Method 1: use sleep ... doesn't work
    //			sleep 1;
    //	Method 2: use requestguildinfo ... obviously doesn't work because its already in map-server memory
    //			requestguildinfo getcastledata( .castle$[.@i], 1 );
    //			requestguildinfo getcastledata( .castle$[.@i], 1 ), "Guardian#"+ .castle$[.@i] +"::OnSpawnGuardians";
    //	Method 3: reset the guild castle ... also doesn't work ??
    //			.@gid = getcastledata( .castle$[.@i], 1 );
    //			setcastledata( .castle$[.@i], 1, 0 );
    //			setcastledata( .castle$[.@i], 1, .@gid );
    			donpcevent "Guardian#"+ .castle$[.@i] +"::OnSpawnGuardians";
    		}
    	}
    	end;
    OnInit:
    	setarray .castle$[0],
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    	bindatcmd "emp", strnpcinfo(0)+"::OnDebug", 99, 100;
    	bindatcmd "gua", strnpcinfo(0)+"::OnGuardianSpawn", 99, 100;
    	end;
    OnDebug:
    	switch ( atoi( .@atcmd_parameters$ ) ) {
    	case 0: warp "aldeg_cas01",216,23; end;
    	case 1: warp "aldeg_cas02",213,23; end;
    	case 2: warp "aldeg_cas03",205,31; end;
    	case 3: warp "aldeg_cas04",36,217; end;
    	case 4: warp "aldeg_cas05",27,101; end;
    	case 5: warp "gefg_cas01",197,181; end;
    	case 6: warp "gefg_cas02",176,178; end;
    	case 7: warp "gefg_cas03",244,166; end;
    	case 8: warp "gefg_cas04",174,177; end;
    	case 9: warp "gefg_cas05",194,184; end;
    	case 10: warp "payg_cas01",139,139; end;
    	case 11: warp "payg_cas02",38,25;   end;
    	case 12: warp "payg_cas03",269,265; end;
    	case 13: warp "payg_cas04",270,28;  end;
    	case 14: warp "payg_cas05",30,30;   end;
    	case 15: warp "prtg_cas01",197,197; end;
    	case 16: warp "prtg_cas02",157,174; end;
    	case 17: warp "prtg_cas03",16,220;  end;
    	case 18: warp "prtg_cas04",291,14;  end;
    	case 19: warp "prtg_cas05",266,266; end;
    	case 20: warp "arug_cas01",87,219; end;
    	case 21: warp "arug_cas02",89,256; end;
    	case 22: warp "arug_cas03",141,293; end;
    	case 23: warp "arug_cas04",141,293; end;
    	case 24: warp "arug_cas05",141,293; end;
    	case 25: warp "schg_cas01",120,272; end;
    	case 26: warp "schg_cas02",162,193; end;
    	case 27: warp "schg_cas03",338,202; end;
    	case 28: warp "schg_cas04",120,272; end;
    	case 29: warp "schg_cas05",120,272; end;
    	default:
    	}
    	end;
    }
      Reveal hidden contents
    
    
    prontera,155,185,5	script	asdasd	1_F_MARIA,{
    	end;
    OnGuardianSpawn:
    	for ( .@i = 0; .@i < 20; ++.@i ) {
    		if ( getcastledata( .castle$[.@i], 1 ) ) {
    			if (.castle$[.@i] == "aldeg_cas01") {
    				setarray .@guardiantype[0],1,2,2,2,2,3,3,3;
    				setarray .@guardianposx[0],17,39,38,45,21,218,213,73;
    				setarray .@guardianposy[0],218,208,196,228,194,24,24,70;
    			}
    			else if (.castle$[.@i] == "aldeg_cas02") {
    				setarray .@guardiantype[0],3,3,3,1,1,2,2,2;
    				setarray .@guardianposx[0],27,88,117,60,51,21,36,210;
    				setarray .@guardianposy[0],184,43,46,202,183,177,183,7;
    			}
    			else if (.castle$[.@i] == "aldeg_cas03") {
    				setarray .@guardiantype[0],3,3,1,1,1,2,2,2;
    				setarray .@guardianposx[0],90,116,86,116,64,212,195,110;
    				setarray .@guardianposy[0],112,112,120,76,103,160,151,217;
    			}
    			else if (.castle$[.@i] == "aldeg_cas04") {
    				setarray .@guardiantype[0],2,2,2,1,1,1,3,3;
    				setarray .@guardianposx[0],187,192,148,145,169,198,48,55;
    				setarray .@guardianposy[0],100,42,88,209,53,77,72,88;
    			}
    			else if (.castle$[.@i] == "aldeg_cas05") {
    				setarray .@guardiantype[0],2,2,1,1,3,3,3,3;
    				setarray .@guardianposx[0],51,188,157,157,27,145,156,41;
    				setarray .@guardianposy[0],202,79,192,74,221,78,73,112;
    			}
    			// Geffen (Britoniah) Castles
    			else if (.castle$[.@i] == "gefg_cas01") {
    				setarray .@guardiantype[0],1,1,1,2,2,3,3,3;
    				setarray .@guardianposx[0],67,184,62,36,50,50,189,200;
    				setarray .@guardianposy[0],179,20,41,186,186,67,41,167;
    			}
    			else if (.castle$[.@i] == "gefg_cas02") {
    				setarray .@guardiantype[0],1,1,1,2,2,3,3,3;
    				setarray .@guardianposx[0],64,56,166,35,20,19,166,159;
    				setarray .@guardianposy[0],168,41,25,148,150,41,42,188;
    			}
    			else if (.castle$[.@i] == "gefg_cas03") {
    				setarray .@guardiantype[0],2,2,1,1,1,3,3,3;
    				setarray .@guardianposx[0],48,113,48,157,243,157,234,238;
    				setarray .@guardianposy[0],176,214,207,62,41,45,25,160;
    			}
    			else if (.castle$[.@i] == "gefg_cas04") {
    				setarray .@guardiantype[0],2,2,1,1,1,3,3,3;
    				setarray .@guardianposx[0],53,31,49,29,147,57,160,148;
    				setarray .@guardianposy[0],191,178,220,46,65,46,50,189;
    			}
    			else if (.castle$[.@i] == "gefg_cas05") {
    				setarray .@guardiantype[0],2,2,1,1,1,3,3,3;
    				setarray .@guardianposx[0],45,71,72,66,177,66,177,193;
    				setarray .@guardianposy[0],149,163,142,47,50,17,35,166;
    			}
    			// Payon (Baulder) Castles
    			else if (.castle$[.@i] == "payg_cas01") {
    				setarray .@guardiantype[0],2,2,2,2,2,2,2,3;
    				setarray .@guardianposx[0],229,225,222,99,65,36,51,138;
    				setarray .@guardianposy[0],92,80,111,45,31,127,144,133;
    			}
    			else if (.castle$[.@i] == "payg_cas02") {
    				setarray .@guardiantype[0],2,2,2,2,2,2,2,3;
    				setarray .@guardianposx[0],237,228,210,57,42,287,264,27;
    				setarray .@guardianposy[0],54,72,41,241,241,257,272,20;
    			}
    			else if (.castle$[.@i] == "payg_cas03") {
    				setarray .@guardiantype[0],2,2,2,2,2,2,2,3;
    				setarray .@guardianposx[0],245,269,36,41,39,19,37,268;
    				setarray .@guardianposy[0],37,51,39,39,65,276,277,244;
    			}
    			else if (.castle$[.@i] == "payg_cas04") {
    				setarray .@guardiantype[0],2,2,2,2,2,2,2,3;
    				setarray .@guardianposx[0],251,232,231,32,32,35,36,270;
    				setarray .@guardianposy[0],212,212,175,287,232,45,17,41;
    			}
    			else if (.castle$[.@i] == "payg_cas05") {
    				setarray .@guardiantype[0],2,2,2,2,2,2,2,3;
    				setarray .@guardianposx[0],19,33,266,266,263,263,250,36;
    				setarray .@guardianposy[0],279,260,234,279,37,21,22,36;
    			}
    			// Prontera (Valkyrie Realms) Castles
    			else if (.castle$[.@i] == "prtg_cas01") {
    				setarray .@guardiantype[0],1,1,1,2,2,3,3,3;
    				setarray .@guardianposx[0],182,182,153,59,50,184,196,107;
    				setarray .@guardianposy[0],62,116,86,28,36,183,189,179;
    			}
    			else if (.castle$[.@i] == "prtg_cas02") {
    				setarray .@guardiantype[0],3,3,3,1,1,2,2,2;
    				setarray .@guardianposx[0],161,153,178,71,49,64,7,75;
    				setarray .@guardianposy[0],161,161,44,75,28,186,196,175;
    			}
    			else if (.castle$[.@i] == "prtg_cas03") {
    				setarray .@guardiantype[0],3,3,3,1,1,2,2,2;
    				setarray .@guardianposx[0],191,137,45,50,41,191,179,191;
    				setarray .@guardianposy[0],190,190,99,87,87,42,43,72;
    			}
    			else if (.castle$[.@i] == "prtg_cas04") {
    				setarray .@guardiantype[0],3,3,3,1,1,1,2,2;
    				setarray .@guardianposx[0],276,274,246,38,29,33,78,36;
    				setarray .@guardianposy[0],14,35,246,240,240,258,48,61;
    			}
    			else if (.castle$[.@i] == "prtg_cas05") {
    				setarray .@guardiantype[0],3,3,3,1,1,1,2,2;
    				setarray .@guardianposx[0],266,287,245,236,251,278,32,44;
    				setarray .@guardianposy[0],262,280,250,63,63,253,253,248;
    			}
    			for (.@i = 0; .@i <= 7; ++.@i) {
    				.@UseGID = .@i + 10;
    				if (.@guardiantype[.@i] == 1) { .@type = 1287; }
    				else if (.@guardiantype[.@i] == 2) { .@type = 1285; }
    				else { .@type = 1286; }
    				if (!getcastledata(.castle$[.@i],.@UseGID)) {
    					setcastledata( .castle$[.@i], .@UseGID, 1 );
    					guardian .castle$[.@i],.@guardianposx[.@i],.@guardianposy[.@i],strmobinfo(2,.@type),.@type,"Guardian#"+.castle$[.@i]+"::OnGuardianDied",.@i;
    				}
    				else
    					guardian .castle$[.@i],.@guardianposx[.@i],.@guardianposy[.@i],strmobinfo(2,.@type),.@type,"Guardian#"+.castle$[.@i]+"::OnGuardianDied",.@i;
    			}
    		}
    	}
    	end;
    OnInit:
    	setarray .castle$[0],
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    	bindatcmd "emp", strnpcinfo(0)+"::OnDebug", 99, 100;
    	bindatcmd "gua", strnpcinfo(0)+"::OnGuardianSpawn", 99, 100;
    	bindatcmd "kil", strnpcinfo(0)+"::Onaaa", 99, 100;
    	end;
    Onaaa:
    	for ( .@i = 0; .@i < 20; ++.@i )
    		killmonster .castle$[.@i], "Guardian#"+.castle$[.@i]+"::OnGuardianDied";
    	end;
    OnDebug:
    	switch ( atoi( .@atcmd_parameters$ ) ) {
    	case 0: warp "aldeg_cas01",216,23; end;
    	case 1: warp "aldeg_cas02",213,23; end;
    	case 2: warp "aldeg_cas03",205,31; end;
    	case 3: warp "aldeg_cas04",36,217; end;
    	case 4: warp "aldeg_cas05",27,101; end;
    	case 5: warp "gefg_cas01",197,181; end;
    	case 6: warp "gefg_cas02",176,178; end;
    	case 7: warp "gefg_cas03",244,166; end;
    	case 8: warp "gefg_cas04",174,177; end;
    	case 9: warp "gefg_cas05",194,184; end;
    	case 10: warp "payg_cas01",139,139; end;
    	case 11: warp "payg_cas02",38,25;   end;
    	case 12: warp "payg_cas03",269,265; end;
    	case 13: warp "payg_cas04",270,28;  end;
    	case 14: warp "payg_cas05",30,30;   end;
    	case 15: warp "prtg_cas01",197,197; end;
    	case 16: warp "prtg_cas02",157,174; end;
    	case 17: warp "prtg_cas03",16,220;  end;
    	case 18: warp "prtg_cas04",291,14;  end;
    	case 19: warp "prtg_cas05",266,266; end;
    	case 20: warp "arug_cas01",87,219; end;
    	case 21: warp "arug_cas02",89,256; end;
    	case 22: warp "arug_cas03",141,293; end;
    	case 23: warp "arug_cas04",141,293; end;
    	case 24: warp "arug_cas05",141,293; end;
    	case 25: warp "schg_cas01",120,272; end;
    	case 26: warp "schg_cas02",162,193; end;
    	case 27: warp "schg_cas03",338,202; end;
    	case 28: warp "schg_cas04",120,272; end;
    	case 29: warp "schg_cas05",120,272; end;
    	default:
    	}
    	end;
    }

    server spam error ...

    
    
    [Error]: mob_spawn_guardian: Attempted to spawn guardian in position 0 which already has a guardian (castle map aldeg_cas01)
    [Error]: mob_spawn_guardian: Attempted to spawn guardian in position 1 which already has a guardian (castle map aldeg_cas02)
    [Error]: mob_spawn_guardian: Attempted to spawn guardian in position 2 which already has a guardian (castle map aldeg_cas03)
    [Warning]: mob_spawn_guardian: Spawning guardian 1285 on a castle with no guild(castle map aldeg_cas04)
    [Warning]: mob_spawn_guardian: Spawning guardian 1285 on a castle with no guild(castle map aldeg_cas05)
    [Warning]: mob_spawn_guardian: Spawning guardian 1286 on a castle with no guild(castle map gefg_cas01)
    [Warning]: mob_spawn_guardian: Spawning guardian 1286 on a castle with no guild(castle map gefg_cas02)
    [Error]: map_addblock: out-of-bounds coordinates ("gefg_cas02",213,24), map is 200x220
    [Warning]: mob_spawn_guardian: Spawning guardian 1286 on a castle with no guild
    (castle map gefg_cas03)

    hmmm ... I think sometimes need to look into this script once again ...

    actually I also have no idea how to fix this ...

    this map-server<->char-server miss-match was planned to do by Haru
    https://github.com/HerculesWS/Hercules/pull/1027#issuecomment-180006223

    thanks for 2 and 3 but what am I right about 1??

    I thought I make something broken???


    and about 3 if I put this part into item script

    strnpcinfo(NPC_NAME)+"::Onaaa"

    I need change the part strnpcinfo(NPC_NAME to make it work, correct?

    
     

  14. #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 );
    }

    As Topic

     

     


  15. -    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;
    }

    As topic

     

    as requested don't blame me multi topic spamming..

     



  16. 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??

     


  17. 1. I was trying to make this work by
                                            donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";

    but it's not working how do I fix this?

    
    			deletearray (.RTaken$);
    			.@menu$ = "";
    			.@c = 0;
    			for ( .@i = 0 ; .@i < getarraysize(.castle$); ++.@i ) {
    				if ( getcastledata( .castle$[.@i], 1 ) == getcharid(CHAR_ID_GUILD) && (.RTaken$[.@i] == .castle$[.@i]) == false ) { // CD_GUILD_ID
    					++.@c;
    					dispbottom ( .@c + " " + getcastlename(.castle$[.@i]) + " is currently controlled by " + strcharinfo(PC_GUILD) + " " + .RTaken$[.@i] ) ;
    					setarray .RTaken$[getarraysize(.RTaken$)],.castle$[.@i];
    					.@menu$ = .@menu$ + getcastlename( .castle$[.@i] );
    					.@menu$ = .@menu$ + ":";
    				}
    			}
    			if (.@c < 1) {
    				mes ( ".@c < 1 You have to work harder to obtain glory, chief!");
    				close;
    			} else {
    				mes ( ".@c == " + .@c);
    				mes ( " Select a Castle." );
    				.@i = select( .@menu$ ) - 1;
    				mes "You selected menu : "+ .@menu$[.@i];
    				while(true) {
    						switch ( select ( 
    							"Maximize Castle Economy & Defense", //xsa//2, 3
    							"Enable Kafra", //xsa//9
    							"Disable Kafra", //xsa//9
    							"Enable All Guardian", // 10 11 12 13 14 15 16 17
    							"Check Guild Status",
    							"Exit"
    						)) {
    								case 1:
    										setcastledata(.RTaken$[.@i], 2, 100 );
    										setcastledata(.RTaken$[.@i], 3, 100 );
    										break;
    								case 2:
    										setcastledata(.RTaken$[.@i], 9, 1 );
    										enablenpc "Kafra Staff#"+.RTaken$[.@i];
    										break;
    								case 3:
    										setcastledata(.RTaken$[.@i], 9, 0 );
    										disablenpc "Kafra Staff#"+.RTaken$[.@i];
    										break;
    								case 4:
    										setcastledata(.RTaken$[.@i], 10, 1 );
    										setcastledata(.RTaken$[.@i], 11, 1 );
    										setcastledata(.RTaken$[.@i], 12, 1 );
    										setcastledata(.RTaken$[.@i], 13, 1 );
    										setcastledata(.RTaken$[.@i], 14, 1 );
    										setcastledata(.RTaken$[.@i], 15, 1 );
    										setcastledata(.RTaken$[.@i], 16, 1 );
    										setcastledata(.RTaken$[.@i], 17, 1 );
    										donpcevent "Guardian#"+.RTaken$[.@i]+"::OnSpawnGuardians";
    										break;
    								case 5:
    		 								dispbottom ( "Guld Name :: " + getcastledata(.RTaken$[.@i], 1) ) ;
    										dispbottom ( "Guild Economy Level :: " + getcastledata(.RTaken$[.@i], 2) ) ;
    										dispbottom ( "Guild Defense Level :: " + getcastledata(.RTaken$[.@i], 3) ) ;
    										dispbottom ( "Guild Kafra :: " + getcastledata(.RTaken$[.@i], 9) ) ;
    										dispbottom ( "Guild 1st Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 10) ) ;
    										dispbottom ( "Guild 2nd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 11) ) ;
    										dispbottom ( "Guild 3rd Guardian Soldier :: " + getcastledata(.RTaken$[.@i], 12) ) ;
    										dispbottom ( "Guild 4th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 13) ) ;
    										dispbottom ( "Guild 5th Guardian Archer :: " + getcastledata(.RTaken$[.@i], 14) ) ;
    										dispbottom ( "Guild 6th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 15) ) ;
    										dispbottom ( "Guild 7th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 16) ) ;
    										dispbottom ( "Guild 8th Guardian Knight :: " + getcastledata(.RTaken$[.@i], 17) ) ;
    										break;
    								case 6:
    										close;
    
    						}
    				}
    				close;
    			}
    
    OnInit:
    	setarray .castle$[0],
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
    	end;
    }


    2. can we disable default woe system and create custom woe system?

    3. by doing this

    
            .@i = 1; .@x = 10;
            while ( .@i <= .@x ) {
                atcommand "@slaveclone "+strcharinfo(0);
                .@i += 1;
            }
            dispbottom ("spawn'ed " + (.@i-1) + " clones" );

    can it able to announce when a slave clone die or should it be changed to something else?
    if yes please show me how.
    and can it be used with 
    *setunitdata ??
     


  18. On 2/14/2019 at 11:19 PM, AnnieRuru said:
      Reveal hidden contents

    1st off, you modified the script
    https://rathena.org/board/topic/118187-h-inserting-this-script-to-woe2/?do=findComment&comment=357391
    originally it wasn't like that

    2nd, first edition woe use OnAgitStart:, second edition woe use OnAgitStart2:
    on rathena (only), training edition woe use OnAgitStart3:
    and you break that part again

    and 3rd, why did you put monsters on unconquered map again, when the official script already did the same thing ???

     

    so the answer to your question is, I have absolutely no idea what you are doing

    ok, read back the topic in rathena, I actually know what you are trying to make
    but your script totally ruined it, and I have no idea where to start fixing that ... it just a total mess

    so by the information what I gotten are ...
    1. you just want to have guardians roaming in conquered castle
    2. "guild_vs2" custom castle is actually not part of the code you want (I provide the template, and you failed to understand the template)

    is that correct ?
    its much easier if I have spoon feed from the beginning

    Yes woe script is messy for me to get my hand on .. its a web hard to know where to where..

    1 original guardian

    + extra guardian (auto respawn)               Was meant for harder woe conquering.

    If not conquer can it be spawned too?

    With auto respawn.

     

    2 correcto..I fail to get the point of it.

    If you will do show me how will I merge those extra part into the woe-fe and worse script.  

×
×
  • Create New...

Important Information

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