Jump to content

Winterfox

Members
  • Content Count

    403
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by Winterfox


  1. @@ShadowLight

     

    You could use setd and getd to atleast save yourself from using a extra var for the mob.

     

    It might require you to iterate trough all your mobs to reset the mobs to kill for one player but performance wise to have to performe that once in a while is a lot better than having more player variables that have to be constantly saved by the map server as long as the player is online.

     

    I imagine something like this could be what you are searching for:

    Adding of a mob to kill to the player:setd( "mob2kill" + .@mobid ), 1;Check if mob got killed etc.OnNPCKillEvent:	// Get last time mob got killed.	.@mob2kill = getd( "mob2kill" + killedrid );	// If the mob2kill is set and the last time the mob got killed was 7 days ago...	if( .@mob2kill && ( .@mob2kill < gettimetick( 2 ) ) ) {		// Hand out reward or whatever.				// Save the cool down time till the mob can be killed again.		setd( "mob2kill" + killedrid, gettimetick( 2 ) + 604800 );	}	Removing a mob from the player:setd( "mob2kill" + .@mobid ), 0;

  2. @@guihleao

     

    Try this one:

    function	script	vip	{	$diasVip = getarg( 0 );	$verificaVip = getarg( 1 );	if ( getgmlevel() == 1 ) {		query_sql "UPDATE `login` SET `group_id` = 1, `dt_vip` = DATE_ADD( `dt_vip`, INTERVAL " + $diasVip + " DAY ) WHERE `group_id` = 1 AND `account_id` = " + getcharid( 3 );		dispbottom "ViP estendido por mais " + $diasVip + " dias! Relogue sua personagem para ativá-lo.";		} else {		query_sql "UPDATE `login` SET `group_id` = 1, `dt_vip` = DATE_ADD( CURDATE(), INTERVAL " + $diasVip + " DAY ) WHERE `group_id` = 0 AND `account_id` = " + getcharid( 3 );		dispbottom "ViP inserido com sucesso! Relogue sua personagem para ativá-lo.";	}}//==========================================================================================================================//				          Função que adiciona 15 dias Vip ao usuário//==========================================================================================================================function	script	vip15	{	callfunc( "vip", 15, 1);}//==========================================================================================================================//				          Função que adiciona 30 dias Vip ao usuário//==========================================================================================================================function	script	vip30	{	callfunc( "vip", 30, 1);}//==========================================================================================================================//				          Função que adiciona 45 dias Vip ao usuário//==========================================================================================================================function	script	vip45	{	callfunc( "vip", 45, 1);}//==========================================================================================================================//				          Função que adiciona 60 dias Vip ao usuário//==========================================================================================================================function	script	vip60	{	callfunc( "vip", 60, 1);}//==========================================================================================================================//			    Função que controla a data de término da conta vip e anúncios ao logar//==========================================================================================================================-	script	GerenciadorVip	-1,{	OnPCLoginEvent:			query_sql "UPDATE `login` SET `group_id`= 0 WHERE `group_id` = 1 AND ( `dt_vip` IS NULL OR `dt_vip` < CURDATE() )";		query_sql "SELECT ( `dt_vip` IS NULL OR `dt_vip` < CURDATE() ) FROM `login` WHERE `account_id` = " + getcharid( 3 ), @verificaVip;		if ( @verificaVip ) {			dispbottom "Torne-se um(a) jogador(a) ViP e tenha benefícios exclusivos!";			end;		}		query_sql "SELECT DATE_FORMAT( `dt_vip`, '%d/%m/%Y' ) FROM `login` WHERE `account_id` = " + getcharid( 3 ), @dataVencimento$;		dispbottom "Sua conta ViP é válida até o dia " + @dataVencimento$ + ".";}

  3. @@tmav94

     

    -	script	whiteList	-1,{	OnWhisperGlobal:		mes "Lista Atualizada";		$whiteList$ = "2000000,2000794,2000839,2000637,2000624,2000016,2004000,2003933,2003884";		mes $whiteList$;		close;}function	script	restrictedCode {	.@query_result = query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1", .@account_id);	if ( .@query_result > 1 && compare( $whiteList$, getcharid(3) ) == 0 ) {		mes "[WARNING]";		mes "Access Denied";		close;	}}prontera,166,206,5	script	Example	405,{	callfunc( "restrictedCode" );		mes "Access granted!";	close;}prontera,164,200,5	script	Example2	405,{	callfunc( "restrictedCode" );		mes "Access granted!";	close;}

  4. @@rector

     

    prontera,166,207,4	script	Flux Point Shop	4_M_YOUNGKNIGHT,{		openshop;	end;	OnInit:		setarray .@itemIds,501, 502, 503;		setarray .@itemPrices, 1, 1, 1; 		tradertype( NST_CUSTOM );		for( .@i = 0; .@i < getarraysize( .@itemIds ); .@i++ )			sellitem .@itemIds[ .@i ], .@itemPrices[ .@i ];	end;	OnCountFunds:		query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance;		setcurrency( .@balance );	end;	OnPayFunds:		query_sql "SELECT balance FROM cp_credits WHERE account_id = " + getcharid( 3 ), .@balance;		if( .@balance < @price ) end;		query_sql "UPDATE cp_credits SET balance = balance - " +  @price + " WHERE account_id = " + getcharid( 3 );		purchaseok();	end;}

  5. @@OverLord

     

    I think you either need a really huge playerbase to have low queue times or you will have horrendous balancing.

    Since nearly all systems will somehow try to predict the team strength of both teams based on individual skills and when there aren't many people the system will have a hard time to find people or it will have to adjust pretty far to end up with really imbalanced teams.


  6. @@OverLord

     

    There is no actual function to do this but you could create one on your own like this:

    function	script	getGuildLvl	{	.@res = query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '" +  getarg( 0 ) + "'", .@guild_lv;	if( .@res )		return .@guild_lv;			return 0;}

  7. @@Creek

     

    I didn't open it, since the error was clear. It was just hard to find where the variable is used. In line 388.

    getmapxy(getd(".m$"+strnpcinfo(3)),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);

    getd gets a reference to a variable based on a string, so you can construct the variable name dynamically.

    In this case getd(".m$"+strnpcinfo(3)) is the same as getd(".m$pacporing1"), so you can add the $ like this:

    getmapxy(getd(".m$"+strnpcinfo(3)+"$"),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);

  8.  

    @@latheesan

     

    Looks like a scam that just takes you too a ton of surveys etc. to download a useless crap software.

    I think if there was a simple dupe hack tool it would be well known and fixed pretty fast.

     

    Let's see if anyone can confirm that it works, which i highly doubt.

     

    yeah i think that was scam too, take a look in video, he disabled general tab chat and he take the focus on the duplicator while not showing the game screen, i wonder when the duplicating is success the obtained item message will show up or not. since you can confirm it make the same video and show what the game screen state when dupe is in proggress or after the duplicate is success

    Yeah, some things were pretty weird. Also this loading screen while duping that runs for some seconds is really weird. I don't think that a duping process will be so cpu intensive that is really that slow if not just for a stupid show effect.


  9. @@Creek

     

    The script function getmapxy atleast uses 4 parameters of which 3 get filled by the function to return results of the search.

     

    The first parameter is a string of the map in your case it should be named .m$pacporing1, .m$pacporing2 and .m$pacporing3 but since they omit the $ at the end of their name they are for integer variables and are not for string content which is returned by getmapxy.

     

    Therefore to work properly you need to change them to: .m$pacporing1$, .m$pacporing2$ and .m$pacporing3$.


  10. @@latheesan

     

    Looks like a scam that just takes you too a ton of surveys etc. to download a useless crap software.

    I think if there was a simple dupe hack tool it would be well known and fixed pretty fast.

     

    Let's see if anyone can confirm that it works, which i highly doubt.


  11. @@Emszy

     

    You have a } to much, this way the rest of the script can't work.

    prontera,98,254,5    script    Bossnia    792,{     mes "[" + strnpcinfo( 1 ) + "]";    mes "Hi!~";    close;    OnInit:        disablenpc "Bossnia";    end;    }-    script    BossniaManager    -1,{    OnClock1500:        announce "Bossnia: You wretched players.", bc_all;        sleep 10000;        announce "Can you face the wrath of the monsters in my map?", bc_all;        sleep 10000;        announce "Come inside if you dare.. *Evil laugh*", bc_all;        sleep 10000;        announce "A random NPC showed up in Prontera!", bc_all;                enablenpc "Bossnia";        initnpctimer;    end;    OnTimer1800000:        announce "Bossnia: 30 Minutes before the entrance closes.", bc_all;            sleep 5000;        announce "Bossnia: Are you all scared? Come on >:)", bc_all;    end;    OnTimer2400000:        announce "Bossnia: 20 Minutes before the entrance closes.", bc_all;    end;    OnTimer3000000:        announce "Bossnia: 10 Minutes before the entrance closes.", bc_all;    end;    OnTimer3600000:        announce "Bossnia: Times up! I will summon him again tomorrow.", bc_all;        disablenpc "Bossnia";        stopnpctimer;    end;}
×
×
  • Create New...

Important Information

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