-
Posts
14 -
Joined
-
Last visited
Profile Information
-
Gender
Male
Davros's Achievements
Poring (1/15)
0
Reputation
-
I alreay knew that, but I want to do like this md5 * email = (md5 return...) Because the normal md5 is kindly unsafe, because if someone get access to my DB the person could easily decrypt all the passwords there stored...
-
In order to keep my server more secure, I want to salt the MD5 passwords, but I don't know how. So, my question is: How can I add a salt, like user's email to the md5 password?
-
Post here the code in line 2119 of src/map/battle.c file.
-
Test now. //===== rAthena Script ======================================= //= Bounty Hunter //===== By: ================================================== //= Forgot who now.. =/ | Being revised by Mysterious //===== Current Version: ===================================== //= 1.9 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Place a bounty on a Player while using a SQL Table //===== Other Information: =================================== // There's a Ladder included //===== TODO: ================================================ // - Revise whole script //===== Additional Comments: ================================= //= v1.0 - First release //= v1.1 - Removed unneccessary Spacing [Mysterious] //= v1.2 - Fixed Sentence structures [Mysterious] //= v1.3 - Fixed massive typos [Mysterious] //= v1.4 - Reorganized parts [Mysterious] //= v1.5 - Edited Credits [Mysterious] //= v1.6 - Organized SQL DB Creation [Mysterious] //= v1.7 - Fixed more issues [Mysterious] //= v1.8 - Fixed more spacing [Mysterious] //= v1.9 - Fixed Sentence structures [Mysterious] //============================================================ // =========== Create SQL Tables ======== /* CREATE TABLE IF NOT EXISTS `bountyladder` (`char_id` int(10) unsigned NOT NULL default '0',`name` varchar(255) NOT NULL,`earned` int(10) unsigned NOT NULL default '0',`assasinated` int(10) unsigned NOT NULL default '0',`target1` varchar(255) NOT NULL,`target2` varchar(255) NOT NULL,`target3` varchar(255) NOT NULL,PRIMARY KEY (`char_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `bountys` (`char_id` bigint(20) unsigned NOT NULL,`name` varchar(255) NOT NULL,`bounty` bigint(20) unsigned NOT NULL,`onoff` tinyint(4) unsigned NOT NULL default '0',`des` varchar(255) NOT NULL,`reason` varchar(255) default NULL,`id` bigint(20) unsigned default '0',`basexp` bigint(20) unsigned NOT NULL,`jobxp` bigint(20) unsigned NOT NULL,`itemid` bigint(20) unsigned NOT NULL,`itemat` bigint(20) unsigned NOT NULL,PRIMARY KEY (`char_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; */ // ====================================== prontera,144,144,4 script Bounty Hunter 65,{ // =========== Settings ========== set nn$,"[ Bounty Hunter ]"; //Name of NPC set $mingm,40; //Minimum GM level to access NPC and change settings Note: You can set 'getgmlevel' to 'getgroupid' as well. // =============================== // Do not remove this. This is used to prevent SQL Error. query_sql ("INSERT bountyladder (char_id,name,earned,assasinated,target1,target2,target3) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',0,0,'Empty','Empty','Empty') ON DUPLICATE KEY UPDATE char_id="+getcharid(0)+""); // Start of Main Script mes nn$; mes "Hello there "+strcharinfo(0)+"! What would you like to do?"; if (getgmlevel() >= $mingm) { menu "- Set a Bounty",L_B,"- View Ladder",L_tl,"- Staff Menu",L_GM; } menu "- Set a Bounty",L_B,"- View Ladder",L_tl; close; end; //Players will set a Bounty or view whose a Bounty L_B: next; mes nn$; mes "Order by:"; menu "Zeny",-,"Name",L_BN,"ID",L_BI,"Search",L_Sb; query_sql ("SELECT count(name) FROM bountys",[email protected]); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set [email protected],-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY bounty DESC LIMIT "[email protected]+"",@name$,@bounty,[email protected]); while ([email protected] < [email protected]) { set [email protected],[email protected] + 1; mes "^DF0101"[email protected][[email protected]]+"^000000# ^FA5858"[email protected]$[[email protected]]+"^000000 "[email protected][[email protected]]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry, it seems I couldn't find "[email protected]+" ID."; close; end; } menu "- Read Info",-,"- Set as a Target",L_ST; query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; close; end; L_BN: query_sql ("SELECT count(name) FROM bountys",[email protected]); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set [email protected],-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY name ASC LIMIT "[email protected]+"",@name$,@bounty,[email protected]); while ([email protected] < [email protected]) { set [email protected],[email protected] + 1; mes "^DF0101"[email protected][[email protected]]+"^000000# ^FA5858"[email protected]$[[email protected]]+"^000000 "[email protected][[email protected]]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry, but it seems I can't find "[email protected]+" ID."; close; end; } menu "- Read Info",-,"- Set as a Target",L_ST; query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; close; end; L_BI: query_sql ("SELECT count(name) FROM bountys",[email protected]); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set [email protected],-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id ASC LIMIT "[email protected]+"",@name$,@bounty,[email protected]); while ([email protected] < [email protected]) { set [email protected],[email protected] + 1; mes "^DF0101"[email protected][[email protected]]+"^000000# ^FA5858"[email protected]$[[email protected]]+"^000000 "[email protected][[email protected]]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "[email protected]+" ID."; close; end; } menu "- Read Info",-,"- Set as a Target",L_ST; query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; close; end; L_sb: next; mes nn$; mes "Would you like to search by.."; menu "- Name",-,"- ID",L_stlid; next; mes "Please input their Name:"; input @sname$; if (query_sql("SELECT id FROM bountys WHERE name='"+escape_sql(@sname$)+"'") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "[email protected]$+"!"; close; end; } next; mes nn$; mes "I was able to find "[email protected]$+". What would you like to do?"; set @search,1; menu "- Read Info",-,"- Set as a Target",L_STS; query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE name='"+escape_sql(@sname$)+"'",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; close; end; L_STS: next; query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@sname$)+"'",@name$); if (@name$ == strcharinfo(0)) { mes nn$; mes "Sorry, but you can't set yourself."; close; end; } query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@sname$)+"'"); query_sql ("SELECT target1,target2,target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@t1$,@t2$,@t3$); if (@t1$ == "") { query_sql ("UPDATE bountyladder SET target1='Empty'"); } if (@t2$ == "") { query_sql ("UPDATE bountyladder SET target2='Empty'"); } if (@t3$ == "") { query_sql ("UPDATE bountyladder SET target3='Empty'"); } query_sql ("SELECT target1,target2,target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@t1$,@t2$,@t3$); menu ""[email protected]$+"",-,""[email protected]$+"",L_STS2,""[email protected]$+"",L_STS3; if (@t1$ != "Empty") { mes nn$; mes "Please choose an empty target slot."; close; end; } if (@name$ == @t2$) { mes nn$; mes "Sorry, but you can only set one target."; close; end; } if (@name$ == @t3$) { mes nn$; mes "Sorry, but you can only set one target."; close; end; } query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@sname$)+"'",@name$); query_sql ("UPDATE bountyladder SET target1='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target1 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target1$); next; mes nn$; mes "Target 1: "[email protected]$+""; close; end; L_STS2: if (@t2$ != "Empty") { mes nn$; mes "Please choose an empty slot."; close; end; } query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@sname$)+"'",@name$); query_sql ("UPDATE bountyladder SET target2='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target2 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target2$); mes nn$; mes "Target 2: "[email protected]$+""; close; end; L_STS3: if (@t3$ != "Empty") { mes nn$; mes "Please choose an empty slot."; close; end; } query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@sname$)+"'",@name$); query_sql ("UPDATE bountyladder SET target3='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target3$); mes nn$; mes "Target 3: "[email protected]$+""; close; end; L_stlid: next; mes nn$; mes "Please input an ID:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "[email protected]+" ID."; close; end; } menu "- Read Info",-,"- Set as a Target",L_ST; query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; close; end; L_ST: next; query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"",@name$); if (@name$ == strcharinfo(0)) { mes nn$; mes "You don't can target yourself."; close; end; } query_sql ("SELECT name FROM bountys WHERE id="[email protected]+""); query_sql ("SELECT target1,target2,target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@t1$,@t2$,@t3$); if (@t1$ == "") { query_sql ("UPDATE bountyladder SET target1='Empty'"); } if (@t2$ == "") { query_sql ("UPDATE bountyladder SET target2='Empty'"); } if (@t3$ == "") { query_sql ("UPDATE bountyladder SET target3='Empty'"); } query_sql ("SELECT target1,target2,target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@t1$,@t2$,@t3$); menu ""[email protected]$+"",-,""[email protected]$+"",L_ST2,""[email protected]$+"",L_ST3; if (@t1$ != "Empty") { mes nn$; mes "This target slot is in using,choose an empty target slot."; close; end; } if (@name$ == @t2$) { mes nn$; mes "You only once can set target 1 character."; close; end; } if (@name$ == @t3$) { mes nn$; mes "You only once can set target 1 character."; close; end; } query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"",@name$); query_sql ("UPDATE bountyladder SET target1='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target1 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target1$); next; mes nn$; mes "Target 1: "[email protected]$+""; close; end; L_ST2: if (@t2$ != "Empty") { mes nn$; mes "This target slot is in using,choose an empty target slot."; close; end; } query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"",@name$); query_sql ("UPDATE bountyladder SET target2='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target2 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target2$); mes nn$; mes "Target 2: "[email protected]$+""; close; end; L_ST3: if (@t3$ != "Empty") { mes nn$; mes "This target slot is in using,choose an empty target slot."; close; end; } query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"",@name$); query_sql ("UPDATE bountyladder SET target3='"[email protected]$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target3$); mes nn$; mes "Target 3: "[email protected]$+""; close; end; // Top of the list L_tl: mes nn$; mes "Order by:"; menu "Earned Zeny",-,"Name",TL_n,"Assasinated players",TL_k,"Search",L_stl; query_sql ("SELECT count(name) FROM bountyladder",[email protected]); next; mes nn$; mes "Explantation:"; mes "^DF0101|Positison|^FF0000 |Name| ^FA5858|earned zeny|^000000 |assasinated .. player|"; set [email protected],-1; set [email protected],0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY earned DESC LIMIT "[email protected]+"",@name$,@eazeny,@kills); while ([email protected] < [email protected]) { set [email protected],[email protected]+1; set [email protected],[email protected]+1; mes "^DF0101"[email protected]+"^000000 ^FF0000"[email protected]$[[email protected]]+" ^FA5858"[email protected][[email protected]]+"^000000 "[email protected][[email protected]]+""; } close; end; TL_k: query_sql ("SELECT count(name) FROM bountyladder",[email protected]); next; mes nn$; mes "Explantation:"; mes "^DF0101|Positison|^FF0000 |Name| ^FA5858|earned zeny| |assasinated .. player|^000000"; set [email protected],-1; set [email protected],0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY assasinated DESC LIMIT "[email protected]+"",@name$,@eazeny,@kills); while ([email protected] < [email protected]) { set [email protected],[email protected]+1; set [email protected],[email protected]+1; mes "^DF0101"[email protected]+"^000000 ^FF0000"[email protected]$[[email protected]]+" ^FA5858"[email protected][[email protected]]+" "[email protected][[email protected]]+""; } close; end; TL_n: query_sql ("SELECT count(name) FROM bountyladder",@rows); next; mes nn$; mes "Explantation:"; mes "^DF0101|Positison|^FF0000 |Name| ^FA5858|earned zeny|^000000 |assasinated .. player|"; set [email protected],-1; set [email protected],0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY name DESC LIMIT "[email protected]+"",@name$,@eazeny,@kills); while ([email protected] < [email protected]) { set [email protected],[email protected]+1; set [email protected],[email protected]+1; mes "^DF0101"[email protected]+"^000000 ^FF0000"[email protected]$[[email protected]]+" ^FA5858"[email protected][[email protected]]+"^000000 "[email protected][[email protected]]+""; } close; end; L_stl: next; mes nn$; mes "Input the searchable name:"; input @sname$; if (query_sql("SELECT name FROM bountyladder WHERE name='"+escape_sql(@sname$)+"'") == 0) { next; mes nn$; mes "Sorry i'm not found "[email protected]$+""; } next; mes nn$; query_sql ("SELECT name,earned,assasinated FROM bountyladder WHERE name='"+escape_sql(@sname$)+"'",@name$,@eazeny,@kills); mes "^FF0000"[email protected]$[0]+" ^FA5858"[email protected][0]+"^000000 "[email protected][0]+""; close; end; // Staff Menu L_GM: next; mes nn$; mes "Hey there! What would you like to do?"; menu "- Add bounty",GM_addbounty,"- Edit bounty",GM_edit,"- Delete bounty",GM_delbounty,"- Delete all bounties",GM_delallb; GM_delbounty: query_sql ("SELECT count(name) FROM bountys",[email protected]); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set [email protected],-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id DESC LIMIT "[email protected]+"",@name$,@bounty,[email protected]); while ([email protected] < [email protected]) { set [email protected],[email protected] + 1; mes "^DF0101"[email protected][[email protected]]+"^000000# ^FA5858"[email protected]$[[email protected]]+"^000000 "[email protected][[email protected]]+""; } mes " "; mes "Please input the ID you wish to delete:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry i'm not found "[email protected]+" Bounty ID."; close; end; } query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; next; mes "Please choose a name:"; input @verify$; if (@verify$ != @name$) { next; mes nn$; mes "Sorry, but that's a wrong name."; close; end; } if (@verify$ == @name$) { next; mes nn$; mes "Thank you."; query_sql ("DELETE FROM bountys WHERE id="[email protected]+""); mes "Name: "[email protected]$+" has been deleted."; close; end; } GM_delallb: next; mes nn$; mes "Are you sure you want to delete all bounties?"; menu "- Yes",-,"- No",L_no; next; mes nn$; query_sql ("DELETE FROM bountys"); mes "All bounties have been deleted."; close; end; GM_edit: query_sql ("SELECT count(name) FROM bountys",[email protected]); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set [email protected],-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id DESC LIMIT "[email protected]+"",@name$,@bounty,[email protected]); while ([email protected] < [email protected]) { set [email protected],[email protected] + 1; mes "^DF0101"[email protected][[email protected]]+"^000000# ^FA5858"[email protected]$[[email protected]]+"^000000 "[email protected][[email protected]]+""; } mes " "; mes "Please input the ID of the Bounty you wish to edit:"; input [email protected]; if (query_sql ("SELECT name FROM bountys WHERE id="[email protected]+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "[email protected]+" ID."; close; end; } query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="[email protected]+"",@name$,@bounty,[email protected],@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; mes " "; mes "What would you like to change?"; menu "- Bounty",GM_editbounty,"- Reason",GM_editreason,"- Description",GM_editdes,"- BaseExp",GM_editbexp,"- JobExp",GM_editjexp,"- Item ID",GM_edititemid,"- Item Amount",GM_edititemat,"- Change Settings Together",-; next; mes "Now input the bounty (How much Zeny):"; mes "Input '0' if you don't want Zeny as a reward."; input @r; next; mes "Now input the reason:"; input @rea$; mes "Now input the description:"; input @d$; next; mes "Now input the BaseExp:"; mes "Note: Please input ' 0 ' if you don't want to give BaseEXP as a reward."; input @bxp; next; mes "Now input the JobExp:"; mes "Note: Please input ' 0 ' if you don't want to give JobEXP as a reward."; input @jxp; next; mes "Now input the itemid:"; mes "Note: Please input less than ' 541 ' if you don't want to give an Item as a reward."; input @iid; next; if (@iid >= 1) { mes "How much should I give out of "[email protected]+"?"; mes "If you input ' 0 ', I'll automatically give out 1."; input @iat; if (@iat == 0) {set @iat,1; next; } } mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]$+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404DItemamount^000000: "[email protected]+""; mes " "; mes "Is everything fine?"; menu "- Yes",-,"- No",L_no; query_sql ("UPDATE bountys SET des='"[email protected]$+"',reason='"[email protected]$+"',bounty="[email protected]+",basexp="[email protected]+",jobexp="[email protected]+",itemid="[email protected]+",itemat="[email protected]+" WHERE id="[email protected]+""); close; end; GM_editbounty: next; mes nn$; mes "Now input the bounty (How much Zeny):"; mes "Please input '0' if you dont to set Zeny as a reward."; input @r; mes "^04B404Bounty^000000: "[email protected]+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET bounty="[email protected]+" WHERE id="[email protected]+""); close; end; GM_editreason: next; mes nn$; mes "Please input a reason:"; input @rea$; mes "^04B404Reason^000000: "[email protected]$+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET reason="[email protected]$+" WHERE id="[email protected]+""); close; end; GM_editdes: next; mes nn$; mes "Please enter a description:"; input @des$; mes "^04B404Description^000000: "[email protected]$+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET des="[email protected]$+" WHERE id="[email protected]+""); close; end; GM_editbexp: next; mes nn$; mes "Please input your desired BaseEXP:"; input @bexp; mes "^04B404BaseExp^000000: "[email protected]+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET basexp="[email protected]+" WHERE id="[email protected]+""); close; end; GM_editjexp: next; mes nn$; mes "Please input your desired JobEXP:"; input @jexp; mes "^04B404JobExp^000000: "[email protected]+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET jobxp="[email protected]+" WHERE id="[email protected]+""); close; end; GM_edititemid: next; mes nn$; mes "Please input your desired Item:"; input @iid; mes "^04B404Itemname(ID)^000000: "[email protected]+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET itemid="[email protected]+" WHERE id="[email protected]+""); close; end; GM_edititemat: next; mes nn$; mes "How much of the item would you like to give?"; input @itemat; mes "^04B404Iteamamount^000000: "[email protected]+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET itemat="[email protected]+" WHERE id="[email protected]+""); close; end; GM_addbounty: next; mes nn$; mes "^FF0000WARNING^000000: Please do not add quotations in your around the characters name!"; next; mes "Insert his/her name:"; input @pname$; if (query_sql ("SELECT name FROM bountys WHERE name='"+escape_sql(@pname$)+"'") == 0) { if (query_sql ("SELECT char_id FROM `char` WHERE name='"+escape_sql(@pname$)+"'") == 0) { next; mes nn$; mes "Sorry, I couldn't find ^04B404"[email protected]$+"^000000."; close; end; } next; mes "Now input the bounty (How much Zeny):"; mes "Input 0 if you don't want zeny as a reward."; input @r; next; mes "Now input the reason:"; input @rea$; mes "Now input the description:"; input @d$; next; mes "Now input the BaseExp."; mes "Input 0 if you don't want BaseExp reward."; input @bxp; next; mes "Now input the JobExp."; mes "Input 0 if you don't want JobExp reward."; input @jxp; next; mes "Now input the itemid."; mes "Input lesser than 501 if you don't want Item Reward reward."; input @iid; next; if (@iid >= 501) { mes "Now input the reward amount of "[email protected]+" itemid."; mes "If you input 0 it's automatically setted to 1."; input @iat; if (@iat == 0) {set @iat,1; } next; } query_sql ("SELECT MAX(id) FROM bountys",[email protected]); set [email protected],[email protected]+1; mes "^04B404Bounty ID^000000: "[email protected]+""; mes "^04B404Name^000000: "[email protected]$+""; mes "^04B404Bounty^000000: "[email protected]+""; mes "^04B404Reason^000000: "[email protected]$+""; mes "^04B404Description^000000: "[email protected]$+""; mes "^04B404BaseExp^000000: "[email protected]+""; mes "^04B404JobExp^000000: "[email protected]+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("[email protected]+")"; mes "^04B404Itemamount^000000: "[email protected]+""; mes " "; mes nn$; mes "Is this fine?"; menu "Yes",-,"No",GM_addbountyno; query_sql ("SELECT char_id FROM `char` WHERE name='"+escape_sql(@pname$)+"'",@cid); query_sql ("INSERT bountys (char_id,name,bounty,onoff,des,reason,id,basexp,jobxp,itemid,itemat) VALUES ("[email protected]+",'"+escape_sql(@pname$)+"',"[email protected]+",1,'"+escape_sql(@d$)+"','"+escape_sql(@rea$)+"',"[email protected]+","[email protected]+","[email protected]+","[email protected]+","[email protected]+")"); close; end; } next; mes nn$; mes "Sorry there is a bounty on "[email protected]$+"'s head."; close; end; GM_maxzeny: mes nn$; mes "What is your current Maximum of Zeny in the server?"; input [email protected]; if ([email protected] == 0) { next; mes nn$; mes "You need to input a number higher than 0!"; next; goto GM_maxzeny; } set $maxzeny,[email protected]; goto L_GM; GM_addbountyno: next; mes nn$; mes "Then try again."; goto GM_addbounty; end; L_no: close; end; // Labels OnPCKillEvent: set @name2$,rid2name(killedrid); query_sql ("SELECT bounty,name,basexp,jobxp,itemid,itemat FROM bountys WHERE name='"+escape_sql(@name2$)+"'",@bountyr,@name$,@bexp,@jexp,@iid,@iamount); query_sql ("SELECT target1,target2,target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@t1$,@t2$,@t3$); if (@t1$ == @name2$) { if (@bexp >= 1) {dispbottom "You have earned "[email protected]+" BaseExp.";set JobExp,[email protected];} if (@jexp >= 1) {dispbottom "You have earned "[email protected]+" JobExp.";set BaseExp,[email protected];} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "[email protected]+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "[email protected]$+" and you have got "[email protected]+" Zeny.";set Zeny,[email protected];} query_sql ("UPDATE bountyladder SET target1='Empty'"); query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"[email protected]+" WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET assasinated=assasinated+1 WHERE char_id="+getcharid(0)+""); announce "[Bounty Hunter]:"[email protected]$+" killed by "+strcharinfo(0)+".",bc_all; end; } else if (@t2$ == @name2$) { if (@bexp >= 1) {dispbottom "You have earned "[email protected]+" BaseExp.";set JobExp,[email protected];} if (@jexp >= 1) {dispbottom "You have earned "[email protected]+" JobExp.";set BaseExp,[email protected];} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "[email protected]+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "[email protected]$+" and you have got "[email protected]+" Zeny.";set Zeny,[email protected];} query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"[email protected]+" WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET assasinated=assasinated+1 WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET target2='Empty'"); announce "[Bounty Hunter]:"[email protected]$+" killed by "+strcharinfo(0)+".",bc_all; } else if (@t3$ == @name2$) { if (@bexp >= 1) {dispbottom "You have earned "[email protected]+" BaseExp.";set JobExp,[email protected];} if (@jexp >= 1) {dispbottom "You have earned "[email protected]+" JobExp.";set BaseExp,[email protected];} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "[email protected]+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "[email protected]$+" and you have got "[email protected]+" Zeny.";set Zeny,[email protected];} dispbottom "You have killed "[email protected]$+" and you have got "[email protected]+" Zeny."; query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"[email protected]+" WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET assasinated=assasinated+1 WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET target3='Empty'"); announce "[Bounty Hunter]:"[email protected]$+" killed by "+strcharinfo(0)+".",bc_all; } else if (@t1 != @enemy$ & @t2 != @enemy$ & @t3 != @enemy$) { end; } // End Bracket }
-
3750 Yeah, Rejected put the wrong number and I followed his sequence.
-
Check players at the same guild in the same map
Davros replied to Davros's question in Scripting Support
Thanks, solved. -
Hello, I want make a script like this: There is a NPC that warps you, but before warping you, the npc checks if there is already 5 members of your guild at the map that the NPC will warps you. Ex: I talk with the npc, he checks if there is already 5 members of your guild at morocc (for example), if there isn't 5 members of your guild at morocc he will teleports you, but if there is already 5 members of your guild at morocc he will display an error message. Can someone help me? Grateful, Davros.
-
Hmm, I though it was possible just with a script. And, I'm having troubles with Mega Resist Potion (ID 12299), it isn't working. It isn't working at all. I still getting stunned, blinded, stoned... Do anyone know how to fix it?
-
Hello guys. How to make a function that when you become blind, it ends the effect. Like: I become blind. The function is called. And it sc_ends the blind effect. Thank you for your attention.
-
It worked. Thanks guys.
-
I want know how to show the items that are listed in the array in a list at the npc. For example: I have this array: setarray .itemsids[0],5360,5361,5363,5362,5364; Would that the items listed in the array appear in the list to select and perform some action. And every 15 listed items appear the option to turn the page and continue the list.
-
I don't get it. How should the script look like?
-
Hi everyone, I would like to change my killmonster2 cmd to, when I use this command, kill all monsters around the server, ALL monster including MVP, mini-boss, etc. If it's possible please teach me how. Here is the code: void atcommand_killmonster_sub(const int fd, struct map_session_data* sd, const char* message, const int drop) { int map_id; char map_name[MAP_NAME_LENGTH_EXT]; if (!sd) return; memset(map_name, '\0', sizeof(map_name)); if (!message || !*message || sscanf(message, "%15s", map_name) < 1) map_id = sd->bl.m; else { if ((map_id = map_mapname2mapid(map_name)) < 0) map_id = sd->bl.m; } map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, drop); clif_displaymessage(fd, msg_txt(165)); // All monsters killed! return; } /*========================================== * *------------------------------------------*/ ACMD_FUNC(killmonster2) { atcommand_killmonster_sub(fd, sd, message, 0); return 0; }