Quest for UniqueID InternalGuard

PrntScrn

New member
Messages
66
Points
0
Github
PrntScrn
Emulator
rAthena
Hello everybody, I'm here needing a help you
default_cool.png
 

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


 
@@PrntScrn

Code:
// |__   __|               |  __  / __  //    | | _____  ____ _ ___| |__) | |  | |//    | |/ _  / / _` / __|  _  /| |  | |//    | |  __/>  < (_| __  |  | |__| |//    |_|___/_/___,_|___/_|  _____/-	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;}
 
@@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.

 
@@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?

 
Last edited by a moderator:
@@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

 
Last edited by a moderator:
@@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$);
Code:
query_sql("insert into `redlist` (account,ip,UniqueID) values ('"+getcharid(3)+"', '"+@ip"', '"+@mac"')")
I do not know indicate the query

 
@@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

Code:
query_sql ("select UniqueID from jogadoresid where UniqueID='",@mac$);
 
@@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.

 
Last edited by a moderator:
Back
Top