Jump to content

Emistry

Support Leaders
  • Content Count

    526
  • Joined

  • Days Won

    21

Posts posted by Emistry


  1. // Will disabled consumables (disabled by map_zone_db.conf) be consumed when trying to use them?// 1 (official): yes// 0: noitem_restricted_consumption_type: 1// Unequip the equipments that has disabled by map_zone_db.conf ?// 0 : disabled equipments and cards are nullify (official)// 1 : disabled equipments are unequip, disabled cards are nullify// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)unequip_restricted_equipment: 0

    https://github.com/HerculesWS/Hercules/blob/master/conf/battle/items.conf


  2. Just some trick ...

     

    I just realize that it's actually possible to use Chinese encoding in Hercules.

    Previously I think only Sear Emulator can do it, and I am wrong xD

     

    The problem : just that the database become messy and unreadable due to table encoding type not compatible.

     

    y8I4AH7.png

     

    NkAKofV.png

     

    Offtopic : Does anyone know how to replace the "Triple" or "Quadraple" keyword when compound same item into card slots ?


  3. I believe these 2 commands is a must for Hercules in the near future, at least some similar script command need to be developed and added into the Hercules emulator.

     

    This is because I have seen official server to released some contents that might required the uses of these script command.

    For example:

    • Faceworm Nest Memorial Dungeon
    • Toy Factory Memorial Dungeon
    • etc.

     

    There 2 quests I noticed that it required the script to be able to alter the data of the summoned monsters.

     

    Faceworm Nest Memorial Dungeon - the Boss MaxHP is affected by number of players who participate in the quest. 
     
    Faceworm Boss MaxHP = Origial Boss MaxHP + ( 2,000,000 * no. of player );
    NPC can "cast skill" to damage the Boss.
    Faceworm Boss could change to another form ( probably another mob id but HP remain unchange I guess )

     

    for the Toy Factory, I not sure it can be category into the same script command or not, but it's also part of "alter monster data" i guess.

     

    Boss Celine Kimi could be changed to "NPC" state when certain condition are meet.  
     
    Ex: HP gap between real Kimi and fake Kimi more than 20% or distance is too far.
    The Monster will be changed into NPC state where player cant attack the Monster.

     

     

    previously, the setmodata / getmobdata is implemented through the MobController script, but the MobController script so these setmobdata/getmobdaat was never officially added into the script.

     

     

    I think it's time for Hercules to add these script commands.

     

     

    * I know rAmod/eAmod have a script command for monster that work quite similar for setmobdata() but they dont have getmobdata() I believe.

    So, but I think setmobdata / getmobdata would be better than having a custom monster script command to spawn a monster that have altered information.

     

     

    Extra :

    http://ea.dj-yhn.com/index.php?c=setmobdata

    http://ea.dj-yhn.com/index.php?c=getmobdata


  4. I can try show an example later when I get back to home.

     

    example :

    56vxlag.png

     

    as you can see from the picture, most of these quest npc are written in a way like this, so that the NPC can tell which monsters they are going to hunt and how many.

    and they are hardcoded into the npc script.

    official server doesnt have any changes for the quest, so there isnt any major issue about it.

     

    but what if the private server plan to adjust the quest ?? then they have to manually adjust all the related NPC script due to the content are mostly hardcoded into the script itself.

     

    if we can add a script command to retrieve the quest information, things could be done easily, even the script could be much more simpler or shorter at certain cases ( *custom script mostly* )

     

    some part may probably look simpler and nicer I guess.

    current script example : 

    		switch(select("Hunt Dark Frame:Hunt Evil Druid:Hunt Wraith:Hunt Raydric Archer")) {			case 1: callsub L_Quest,10110,.@str1$+"Hunt 10 Dark Frames.",.@str2$;			case 2: callsub L_Quest,10111,.@str1$+"Hunt 10 Evil Druids.",.@str2$;			case 3: callsub L_Quest,10112,.@str1$+"Hunt 10 Wraiths.",.@str2$;			case 4: callsub L_Quest,10113,.@str1$+"Hunt 10 Raydric Archers.",.@str2$;		}

     

    if we have getquestinfo( <quest id>,<param> )  ,  assume param 1  = quest title.

    		setarray .@quest_id,			10110,			10111,			10112,			101103;		.@quest_id_size = getarraysize( .@quest_id );		for ( .@i = 0; .@i < .@quest_id_size; .@i++ ) {			.@quest_menu$ = .@quest_menu$ + getquestinfo( .@quest_id[.@i],1 ) + ":";		}		.@i = select( .@quest_menu$ ) - 1;		callsub L_Quest,.@quest_id[.@i],.@str1$+"Hunt "+getquestinfo( .@quest_id[.@i],1 ),.@str2$;

    we could write it this way, where we only need to provide the quest id.

    it reduced the redundancy for certain part of the script.


  5. Owh I see, so the topic is there. I remember this has been discussed before but I unable to locate the topic . Thx

     

    EDIT :

    if add mapcache per map & load per map

     

    can this ?

    ...

    oh clever o-o indeed that'd be much much much much much...much more efficient

    seem like it's possible.

  6. is it possible to have a command to reload mapcache ?

    perhap a new atcommand or maybe a console command ?

     

    i think it's useful since it can reload the mapcache.dat without need to restart the server

     

     

    reload all the mapcache.dat , conf/maps.conf , db/map_index.txt

     

     


  7. quest_db: (//  Quest Database///****************************************************************************** ************* Entry structure ************************************************ ******************************************************************************{	Id: Quest ID                    [int]	Name: Quest Name                [string]	TimeLimit: Time Limit (seconds) [int, optional]	Targets: (                      [array, optional]	{		MobId: Mob ID           [int]		Count:                  [int]	},	... (can repeated up to MAX_QUEST_OBJECTIVES times)	)	Drops: (	{		ItemId: Item ID to drop [int]		Rate: Drop rate         [int]		MobId: Mob ID to match  [int, optional]	},	... (can be repeated)	)},

     

    since the quest structure has been updated.

    Is it possible Hercules implement a script command to retrieve the information based on quest id ?

     

    it seem like useful for script that link to the quests.

     

    You dont need to hardcore what monster/item are going to hunt in the script. 

    getquestinfo( <param> );	1	-	quest ID	2	-	quest Name	3	-	time limit	4	-	array of targets (mob id + count)	5	-	array of drops (item id + count)	

     


  8. prontera,153,152,1	trader	TestCustom2	4_F_EDEN_OFFICER,{	OnInit:	tradertype(NST_CUSTOM);	sellitem Red_Potion,2;	end;/* allows currency to be item 501 and 502 */OnCountFunds:	setcurrency(countitem(Red_Potion),countitem(Orange_Potion));	end;/* receives @price (total cost) and @points (the secondary input field for cash windows) */OnPayFunds:	dispbottom "Hi: price="+@price+" and points="+@points;	if( countitem(Orange_Potion) < @points || countitem(Red_Potion) < @price-@points )		end;	delitem Orange_Potion,@points;	delitem Red_Potion,@price-@points;	purchaseok();	end;}

    https://github.com/HerculesWS/Hercules/blob/master/doc/sample/npc_trader_sample.txt#L24

     

    sample already given in the script.

×
×
  • Create New...

Important Information

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