Jump to content
  • 0
Sign in to follow this  
PrntScrn

Quest for UniqueID InternalGuard

Question

Hello everybody, I'm here needing a help you B) 

I'm trying to put this script to limit the item just for a UniqueID...

 

My SQL UniqueID

DROP TABLE IF EXISTS `jogadoresid`;create table `jogadoresid` (`id` int(10) unsigned not null auto_increment,`UniqueID` varchar(255) not null,`IP` varchar(255) not null,`Data` date not null,`Hora` time not null,primary key (id));

 


My SQL RedList


 

DROP TABLE IF EXISTS `redlist`;CREATE TABLE `redlist` (`id` int(11) unsigned NOT NULL auto_increment,`account` int(11) unsigned NOT NULL default '0',`UniqueID` varchar(255) not null,`ip` varchar(100) NOT NULL default '0.0.0.0',PRIMARY KEY (`id`))ENGINE=MyISAM;




My Npc

// |__   __|               |  __  / __  //    | | _____  ____ _ ___| |__) | |  | |//    | |/ _  / / _` / __|  _  /| |  | |//    | |  __/>  < (_| __  |  | |__| |//    |_|___/_/___,_|___/_|  _____/-	script	Pack Iniciante	90,{OnPCLoginEvent:setarray @itens[0],5107,20100,20136,20135,20089; //Aqui você adiciona o ID dos itens setarray @qtd[0],1,3,200,100,1;	//Aqui você colocará a quantidade de cada umquery_sql ("select last_ip from login where account_id='"+getcharid(3)+"'",@ip$);query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);query_sql ("select ip from redlist where ip='"+@ip$+"'",@exist$);if (@exist$!=@ip$){query_sql("insert into `redlist` (account,ip,UniqueID) values ('"+getcharid(3)+"', '"+@ip$+"', '"+@mac$+"')");}else {set #jarecebeu,1;end;}if (#jarecebeu == 1) { Mes "O pack Inciante é dado apenas uma vez";}		mes "^00FF00 Bem Vindo^000000 ao ^FF0000Texas-RO ^000000";mes "";mes "Vejo que você é novo por aqui, então vou te dar o Pack Iniciante!!";mes "Você receberá no Pack, os seguintes itens:";next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	set .@nome$, .@nome$+getitemname(@itens[.@i]);		mes "[^FF0000"+@qtd[.@i]+"^000000] ^0000FF"+.@nome$+"^000000";	set .@nome$,"";}next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	getitem @itens[.@i],@qtd[.@i];}set #jarecebeu,1;next;mes "Prontinho, faça bom uso!! ^^";close;end;}

 



My error?
6OLWyCd.png
 

 

My Table mac -->
enVKq33.png

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

@@PrntScrn

// |__   __|               |  __  / __  //    | | _____  ____ _ ___| |__) | |  | |//    | |/ _  / / _` / __|  _  /| |  | |//    | |  __/>  < (_| __  |  | |__| |//    |_|___/_/___,_|___/_|  _____/-	script	Pack Iniciante	90,{OnPCLoginEvent:setarray @itens[0],5107,20100,20136,20135,20089; //Aqui você adiciona o ID dos itens setarray @qtd[0],1,3,200,100,1;	//Aqui você colocará a quantidade de cada umquery_sql ("select last_ip, last_mac from login where account_id='"+getcharid(3)+"'",@ip$, @mac$);query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);query_sql ("select ip from redlist where ip='"+@ip$+"'",@exist$);if (@exist$!=@ip$){query_sql("insert into `redlist` (account,ip,UniqueID) values ('"+getcharid(3)+"', '"+@ip$+"', '"+@mac$+"')");}else {set #jarecebeu,1;end;}if (#jarecebeu == 1) { Mes "O pack Inciante é dado apenas uma vez";}		mes "^00FF00 Bem Vindo^000000 ao ^FF0000Texas-RO ^000000";mes "";mes "Vejo que você é novo por aqui, então vou te dar o Pack Iniciante!!";mes "Você receberá no Pack, os seguintes itens:";next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	set .@nome$, .@nome$+getitemname(@itens[.@i]);		mes "[^FF0000"+@qtd[.@i]+"^000000] ^0000FF"+.@nome$+"^000000";	set .@nome$,"";}next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	getitem @itens[.@i],@qtd[.@i];}set #jarecebeu,1;next;mes "Prontinho, faça bom uso!! ^^";close;end;}

Share this post


Link to post
Share on other sites
  • 0

 

@@PrntScrn

// |__   __|               |  __  / __  //    | | _____  ____ _ ___| |__) | |  | |//    | |/ _  / / _` / __|  _  /| |  | |//    | |  __/>  < (_| __  |  | |__| |//    |_|___/_/___,_|___/_|  _____/-	script	Pack Iniciante	90,{OnPCLoginEvent:setarray @itens[0],5107,20100,20136,20135,20089; //Aqui você adiciona o ID dos itens setarray @qtd[0],1,3,200,100,1;	//Aqui você colocará a quantidade de cada umquery_sql ("select last_ip, last_mac from login where account_id='"+getcharid(3)+"'",@ip$, @mac$);query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);query_sql ("select ip from redlist where ip='"+@ip"'",@exist$);if (@exist$!=@ip$){query_sql("insert into `redlist` (account,ip,UniqueID) values ('"+getcharid(3)+"', '"+@ip"', '"+@mac"')");}else {set #jarecebeu,1;end;}if (#jarecebeu == 1) { Mes "O pack Inciante é dado apenas uma vez";}		mes "^00FF00 Bem Vindo^000000 ao ^FF0000Texas-RO ^000000";mes "";mes "Vejo que você é novo por aqui, então vou te dar o Pack Iniciante!!";mes "Você receberá no Pack, os seguintes itens:";next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	set .@nome$, .@nomegetitemname(@itens[.@i]);		mes "[^FF0000"+@qtd[.@i]+"^000000] ^0000FF"+.@nome"^000000";	set .@nome$,"";}next;for (set .@i,0; .@i<getarraysize(@itens); set .@i,.@i+1){	getitem @itens[.@i],@qtd[.@i];}set #jarecebeu,1;next;mes "Prontinho, faça bom uso!! ^^";close;end;}

No thank you very much. just want an idea of how to solve it.

Share this post


Link to post
Share on other sites
  • 0

@@PrntScrn

 

you should be more specific if you just want a hint instead of a solution. Even though you could simply get what you need to do by checking out what i posted.

 

You insert a mac address that you fetched nowhere, as far as i know the protection solutions save it as last_mac or something similiar in the login table.

 

if internal guard doesn't save the mac in login though you simply have to query jogadoresid by ip to get the mac?

 

To fix it you just need to fetch the mac you want to insert?

Edited by Winterfox

Share this post


Link to post
Share on other sites
  • 0

@@PrntScrn

 

you should be more specific if you just want a hint instead of a solution. Even though you could simply get what you need to do by checking out what i posted.

 

You insert a mac address that you fetched nowhere, as far as i know the protection solutions save it as last_mac or something similiar in the login table.

 

if internal guard doesn't save the mac in login though you simply have to query jogadoresid by ip to get the mac?

 

To fix it you just need to fetch the mac you want to insert?

the internalguard automatic gets the MAC, I want to do the script read the MAC and record the Redlist for limit 1 UniqueID

Edited by PrntScrn

Share this post


Link to post
Share on other sites
  • 0

@@Winterfox

 

@@PrntScrn

 

The problem is far more simple i guess. You seem to have a typo. Its called @mac$ once and @mac in another part.

query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);
query_sql("insert into `redlist` (account,ip,UniqueID) values ('"+getcharid(3)+"', '"+@ip"', '"+@mac"')")

I do not know indicate the query

Share this post


Link to post
Share on other sites
  • 0

@@PrntScrn

 

Nevermind the last thing, seems like quoting a codesnippet messes with some things.

 

Did you test if @mac$ is really set automatically? I still doubt it is.

 

What is this for? It seems to just query without the results beeing used anyway

query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);

Share this post


Link to post
Share on other sites
  • 0

 

@@PrntScrn

 

Nevermind the last thing, seems like quoting a codesnippet messes with some things.

 

Did you test if @mac$ is really set automatically? I still doubt it is.

 

What is this for? It seems to just query without the results beeing used anyway

query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);

I want to see the query UniqueID that is jogadoresid, and applies the Redlist table in the UniqueID .... This npc works only with ip ... More'm trying to upgrade it to work for mac too.

Edited by PrntScrn

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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