whateverhafiz Posted February 23, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 08/08/12 Last Seen: March 26, 2013 Share 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 Link to comment Share on other sites More sharing options...
Bahmut Posted February 23, 2013 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 382 Reputation: 39 Joined: 01/17/12 Last Seen: February 13, 2020 Share Posted February 23, 2013 What exactly do you mean? Is the script not working? Quote Link to comment Share on other sites More sharing options...
whateverhafiz Posted February 26, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 08/08/12 Last Seen: March 26, 2013 Author Share Posted February 26, 2013 i missing my sql script :'( Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 26, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: April 20 Share 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 Link to comment Share on other sites More sharing options...
whateverhafiz Posted February 26, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 08/08/12 Last Seen: March 26, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted February 26, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: April 20 Share 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 Link to comment Share on other sites More sharing options...
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.
Link to comment
Share on other sites
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.