Jump to content

Emistry

Support Leaders
  • Content Count

    526
  • Joined

  • Days Won

    21

Posts posted by Emistry


  1. https://github.com/HerculesWS/Hercules/blob/master/conf/login-server.conf#L150

     

    // Client MD5 hash check// If turned on, the login server will check if the client's hash matches// the value below, and will not connect tampered clients.// Note: see doc/md5_hashcheck.txt for more details.client_hash_check: off// Client MD5 hashes// The client with the specified hash can be used to log in by players with// a group_id equal to or greater than the given value.// If you specify 'disabled' as hash, players with a group_id greater than or// equal to the given value will be able to log in regardless of hash (and even// if their client does not send a hash at all.)// Format: group_id, hash// Note: see doc/md5_hashcheck.txt for more details.//client_hash: 0, 113e195e6c051bb1cfb12a644bb084c5//client_hash: 10, cb1ea78023d337c38e8ba5124e2338ae//client_hash: 99, disabled

    get the files Hash and add into the conf files.


  2.  

    It depends on return type of function, and what does function do...

    Ohh. Okay. So if it's like ' -1 = yes, 0= no, 1 = maybe '

    return 0 will be no and return -1 will be yes?

     

    Depend on what you want the script/function to return. 

    It's depend on what you want it to be, what these value will be represent.

    It's all define by yourself.

     

    Or course, these "1/0" , "true/false" are some standard that you could follow.

    Useful to indicate the outcome of function is "success/fail" ...

     

    https://answers.yahoo.com/question/index?qid=20121125180438AAk9sSo


  3.  

    -	script	InitConfig	-1,{OnInit:	setcell "thor_v03",1,1,3,105,cell_walkable,0;	killmonsterall "thor_v03";}

    That's what I used on my server in the past. The killmonsterall call is necessarry, because monsters might have already been loaded before this particular script was loaded.

     

    well, this trick is actually, ....... quite USELESS ...  :mellow:

     

    Why ?

    Because when the server reload / startup .. all monster coordinate spawn are randomized. 

    Yes , you couldn't refrain it from spawn on that hidden area at the starting, but how about next time when it respawn again ?

    Overlooked the cell updating line.

     

    Your possible solutions :

    • update your mapcache  after you remove that hidden part from your map files. ( ideal )
    • limit the spawn location / area of monsters.
    • set a script / auto kill the monster every few hours or detected the monster appear in hidden area. ( bad practice )


  4. prontera,155,165,5	script	Sample#thanatos	757,{	mes "Summon Thanatos ?";	mes " ";	mes "You need:";	for ( .@i = 0; .@i < .required_item_size; .@i++ ) {		mes " > "+getitemname( .required_item[.@i] );		if ( !countitem( .required_item[.@i] ) )			.@fail++;	}	if ( select( "Take it","Cancel" ) == 1 ) {		if ( getmapusers( .map$ ) ) {			mes "Someone already inside it.";		}		else if ( !.@fail ) {			for ( .@i = 0; .@i < .required_item_size; .@i++ )				delitem .required_item[.@i],1;			warp .map$,0,0;			killmonsterall .map$;			monster .map$,0,0,"--ja--",1708,1;		}		else {			mes "You didnt meet the requirement.";		}	}	close;		OnInit:		.map$ = "evt_coke";		setarray .required_item,			7436,			7437,			7438,			7439;		.required_item_size = getarraysize( .required_item );				getmapxy( .@npc_map$,.@npc_x,.@npc_y,1 );		setmapflagnosave( .map$,.@npc_map$,.@npc_x,.@npc_y );		end;}

  5. -	script	map_player_count	-1,{	end;	OnTimer3000:		delwaitingroom;		waitingroom getusers( 8 ) + " players in "+strnpcinfo(4), 0;			OnInit:		if ( strnpcinfo(4) != "" ) 			initnpctimer;		end;}prontera,155,181,4	duplicate(map_player_count)	Prontera Count	2_BULLETIN_BOARDmorocc,155,181,4	duplicate(map_player_count)	Morocc Count	2_BULLETIN_BOARDpayon,155,181,4	duplicate(map_player_count)	Payon Count	2_BULLETIN_BOARDalberta,155,181,4	duplicate(map_player_count)	Alberta Count	2_BULLETIN_BOARD

  6. there is no need to use array... and much the script so complicated.

     

    this is sufficient.

    -	script	sample#ip_mac	-1,{	OnInit:		.useLastMAC = 1;		end;	OnPCLoginEvent:		@accinfo_aid = getcharid(3);		query_sql("SELECT `"+( ( .useLastMAC )?"lasp_mac":"last_ip" )+"` FROM login WHERE account_id = "+ @accinfo_aid , @accinfo_ip_mac$ );		dispbottom "Account ID : "+@accinfo_aid ;		dispbottom "Last "+( ( .useLastMAC  )? "MAC":"IP" )+" : "+@accinfo_ip_mac$;		end;}

    just save the variable in a char temporary variable that last until your char logout.

    @accinfo_aid @accinfo_ip_mac$

    these 2 variable could store the IP/MAC and AccountID that you need.  (accountID is alway available using the [wiki=getcharid](3) tho.)

×
×
  • Create New...

Important Information

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