whateverhafiz Posted February 23, 2013 Posted February 23, 2013 (edited) can anyone make this SQL script For me? thanks. - script Arena#PCDie -1,{ OnPCDieEvent: if(BaseLevel!=255) end; getmapxy @map$,@x,@y,0; if ( @map$ == $pvp$[$pvp] ) goto PvP; if ( @map$ == $gvg$[$gvg] ) goto GvG; if ( @map$ == $nvn$[$nvn] ) goto NvN; end; PvP: set @CID,getcharid(0);set @name$,"";set @points,0; query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@points; query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kill Count: 1"; end; } query_sql "UPDATE `pvp` SET `deaths` = `deaths` + 1 WHERE `char_id`="+@CID+"",@esc$; end; GvG: set @GID,getcharid(2);set @name$,"";set @gpoints,0; query_sql "SELECT `deaths` FROM `gvg` WHERE `guild_id`="+@GID+"",@gpoints; query_sql "SELECT `name` FROM `gvg` WHERE `guild_id`="+@GID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO`gvg` (`guild_id`,`name`,`deaths`) VALUES ("+@GID+",'"+strcharinfo(2)+"',1)",@esc$; dispbottom "Pontuação da Guild: 1"; end; } query_sql "UPDATE `gvg` SET `deaths` = `deaths` + 1 WHERE `guild_id`="+@GID+"",@esc$; end; NvN: set @CID,getcharid(0);set @name$,"";set @points,0; query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@points; query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kill Count: 1"; end; } query_sql "UPDATE `pvp` SET `deaths` = `deaths` + 1 WHERE `char_id`="+@CID+"",@esc$; end; } Anyone can help me? npcs.txt Edited February 23, 2013 by Emistry Wrapped all script with [code] tag. Quote
Bahmut Posted February 23, 2013 Posted February 23, 2013 What exactly do you mean? Is the script not working? Quote
whateverhafiz Posted February 26, 2013 Author Posted February 26, 2013 i missing my sql script :'( Quote
Emistry Posted February 26, 2013 Posted February 26, 2013 like this ? Untested ~ CREATE TABLE IF NOT EXISTS `pvp` ( `char_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `deaths` smallint(4) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; Quote
whateverhafiz Posted February 26, 2013 Author Posted February 26, 2013 like this ? Untested ~ CREATE TABLE IF NOT EXISTS `pvp` ( `char_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `deaths` smallint(4) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; IF GVG ? thanks Quote
Emistry Posted February 26, 2013 Posted February 26, 2013 CREATE TABLE IF NOT EXISTS `gvg` ( `guild_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `deaths` smallint(4) unsigned NOT NULL default '0', ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `pvp` ( `char_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(30) NOT NULL DEFAULT '', `deaths` smallint(4) unsigned NOT NULL default '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; Quote
Question
whateverhafiz
can anyone make this SQL script For me? thanks.
Anyone can help me?
npcs.txt
Edited by EmistryWrapped all script with [code] tag.
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.