Jump to content
  • 0

anti-cheating script


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

 

Hello community, I would like to add a constraint to a custom command: (https://pastebin.com/txQA4J2f) being forbidden to activate this command if it is equipped with the item (ID 4263 + 1755) it already has this restriction, however, to spam or change of equipment the command it is possible to circumvent the restriction, I would somehow not be able to cheat the restriction of item

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Based on Mahiro's suggestion:

-	script	paytowinbuffs	-1,{
OnPCStatCalcEvent:
	if(isequippedcnt(4263,1755) > 0) {
		for(;.@i < .ele_size;.@i++)
			sc_end .elements[.@i];
	}
	end;
OnBuffs:
	if(gettimetick(2) < @use_delay){
		dispbottom( "You have to wait "+Time2Str(@use_delay)+" to use the command again.", 0xFF0000 );
		end;
	}
	if(getgroupid() <= 4) {
		message strcharinfo(0),"Falha, você não possui VIP.";
		end;
	}
	if(isequippedcnt(4263,1755) > 0) {
		message strcharinfo(0),"Não funciona equipado com Samurai Encarnado.";
		end;
	}
	for(;.@i < .ele_size;.@i++)
		sc_end .elements[.@i];
	.@menu$ = implode(.buffs$,":");
	.@i = prompt(.@menu$) -1;
	if(.@i < 254 && gettimetick(2) >= @use_delay && isequippedcnt(4263,1755) < 1) {
		sc_start .elements[.@i],180000,5;
		@use_delay = gettimetick(2) + .use_delay;
	}
	end;
OnInit:
	.use_delay = 30; // 30 second use delay
	setarray .buffs$, "^800080Envenenar Arma^000000", "^40E0D0Aspersio^000000", "^000000Sombrio^000000", "^FFD700Encantar com Ventania^000000", "^0000FFEncantar com Geada^000000", "^FF0000Encantar com Chama^000000", "^B8860BEncantar com Terremoto^000000";
	setarray .elements, 26, 37, 144, 98, 97, 96, 99;
	.ele_size = getarraysize(.elements);
	bindatcmd "encantar","paytowinbuffs::OnBuffs",0,99;
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   10
  • Joined:  08/02/18
  • Last Seen:  

*sc_end <effect type>{,<GID>};

 

Maybe that's what you're looking for, just make sure that when you equip the Card remove those BUFFs from the variable. 

  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...