Jump to content

Emistry

Support Leaders
  • Content Count

    526
  • Joined

  • Days Won

    21

Posts posted by Emistry


  1. @@Emistry

     

    The first won't work.

     

    Leaving the map would reset the script and the part after the loop would never get executed.

     

    The second should work, but it is pretty unrealistic since i guess he wants this function global. For OnPCLoadMapEvent you need to add it via Mapflag to all maps which would produce a high server load and some other changes would be required to make it possible at all.

    it work fine in my Hercules test server. 


  2. some random idea.

    OnPCDieEvent:	.@map$ = strcharinfo(3);	if ( .@map$ == "prontera" ) {		while ( strcharinfo(3) == .@map$ )			sleep2 1000;				announce strcharinfo(0)+" has died and back to Save Points.",bc_all;	}	end;

     

    can be done with various way .... like using this way too

    OnCheck:	if ( strcharinfo(3) != "prontera" ) {		announce strcharinfo(0)+" has died and back to Save Points.",bc_all;	}OnPCLoadMapEvent:	deltimer strnpcinfo(0)+"::OnCheck";	if ( strcharinfo(3) == "prontera" )		addtimer 5000,strnpcinfo(0)+"::OnCheck";	end;

  3. .@rate = rand( 100 );if ( .@rate <= 10 ) {	.@item = F_Rand( 5074,5132 );}else if ( .@rate <= 40 ) {	.@item = F_Rand( 5766,5786 );}else else {	.@item = F_Rand( 5474,5137 );}getitem .@item,1;announce strcharinfo(0)+" has been rewarded with "+getitemname( .@item )+";bc_all;

  4. for monster hunting quest, I do suggest you use the Quest System. Basically it fix all your issue and help to solve everything, all you need is just assign the quest and check for which quest is available for that particular weeks.

     

    @@Winterfox

    your method does save a from using extra variable to store the kill count, but your attempt end up wasting resources.

    Imagine the server have 100 monsters only, if that characters everything hunt all the 100 monsters, basically that characters generated 100 variables.

    1 account consist 9 characters or more, end up become >=  900 variables per accounts.

    imagine the resources that need to spent to store all these data...

     

    A checking on mob id is a must.


  5. /* custom npc trader */prontera,153,152,1	trader	TestCustom2	4_F_EDEN_OFFICER,{	OnInit:	tradertype(NST_CUSTOM);	sellitem Red_Potion,2;	end;/* allows currency to be ##CASHPOINTS */OnCountFunds:	setcurrency( ##CASHPOINTS );	end;/* receives @price (total cost) */OnPayFunds:	if( ##CASHPOINTS < @points )		end;	##CASHPOINTS -= @points;	purchaseok();	end;}

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


  6. it's possible if you already have the cell_pvp source modification.

     

    but it's impossible to set an area with that shape. Your current solution would be set the cell_pvp line by line for these area unless it's a square shape..

×
×
  • Create New...

Important Information

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