capWinters
New member
- Messages
- 5
- Points
- 0
Good evening ladies and gentlemen!
I'm having problems with a script, and I tried to solve it anyway, seeing that my experience in scripts is very amateur, I come through this to ask you for help. please, of course.
This script has to give 100 points only to those who destroy the chest.
And 50 points for the rest of the guild.
For those who destroyed the chest, he gives points without problems, but for the rest of the guild he is not giving it, and I am receiving this error.
Script:
Table:
thank you all.
I'm having problems with a script, and I tried to solve it anyway, seeing that my experience in scripts is very amateur, I come through this to ask you for help. please, of course.
This script has to give 100 points only to those who destroy the chest.
And 50 points for the rest of the guild.
For those who destroyed the chest, he gives points without problems, but for the rest of the guild he is not giving it, and I am receiving this error.
Script:
OnTimer900000:
announce "[Wot] Os baús apareceram",8;
monster "prt_are_in",178,140,"Bau do Tesouro",1324,1,"War of Treasure::OnThisMobDeath";
stopnpctimer;
OnThisMobDeath:
set @GID,getcharid(0);
set .@ACC,getcharid(3);
query_sql "UPDATE `login` SET `pontoswot` = `pontoswot` +100 WHERE `account_id`="+.@ACC+"";
announce "[Guerra do Tesouro] O jogador ["+strcharinfo(0)+"] do clã ["+getguildname(@GID)+"] acaba de destruir um dos baús!",8;
atcommand "@cash 100";
set .@GUILD,getcharid(2);
query_sql "UPDATE `guild` SET `baus` = `baus` +1 WHERE `guild_id`="+.@GUILD+"";
query_sql "UPDATE `guild` SET `pontosgwot` = `pontosgwot` +50 WHERE `guild_id`="+.@GUILD+"";
end;
}
announce "[Wot] Os baús apareceram",8;
monster "prt_are_in",178,140,"Bau do Tesouro",1324,1,"War of Treasure::OnThisMobDeath";
stopnpctimer;
OnThisMobDeath:
set @GID,getcharid(0);
set .@ACC,getcharid(3);
query_sql "UPDATE `login` SET `pontoswot` = `pontoswot` +100 WHERE `account_id`="+.@ACC+"";
announce "[Guerra do Tesouro] O jogador ["+strcharinfo(0)+"] do clã ["+getguildname(@GID)+"] acaba de destruir um dos baús!",8;
atcommand "@cash 100";
set .@GUILD,getcharid(2);
query_sql "UPDATE `guild` SET `baus` = `baus` +1 WHERE `guild_id`="+.@GUILD+"";
query_sql "UPDATE `guild` SET `pontosgwot` = `pontosgwot` +50 WHERE `guild_id`="+.@GUILD+"";
end;
}
Table:
ALTER TABLE `login` ADD `baus` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `login` ADD `pontoswot` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `guild` ADD `baus` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `guild` ADD `pontosgwot` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `login` ADD `pontoswot` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `guild` ADD `baus` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `guild` ADD `pontosgwot` INT( 11 ) NOT NULL DEFAULT '0';
thank you all.