Jump to content

mrlongshen

Members
  • Posts

    1302
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by mrlongshen

  1. are you sure you have check many times ? go check bro. 20x maybe you can see which one the problem
  2. Please read this for more info http://rathena.org/wiki/Compiling
  3. up post. can someone add new features on this npc ? for example. when GM send cotton shirt to player. gm can set 0-10 refine rate there. by type 0-10 on the empty column on the prompt. can someone did that ?
  4. i have to disable the sleep if not, i cannot warp. hehe
  5. LOL. make it urself. the asurahosting is only to run your game database only~
  6. sometimes from +6 to +7 also failed..
  7. emistry help me.. prontera,143,133,5 Donation warper 123,{ if( countitem( <ticketID> ) ) warp "prontera",155,181; else npctalk "You dont have the ticket."; end; } its not works ? can u give full script of simple warper require item for donation room ?
  8. cannot. hmmm. dont know what error. hmmm topic close. find by myself.
  9. erm ok . hope someone help me.
  10. thx alot bro but i get the problem. when i have change it to 20. when i want continue ++ my item. i had to cancel the npc and enter back. i cannot continue. why ? i can continue by spam the continue. and the npc are always success. OMG!
  11. bro where to increase the max refine ? because my max refine is +20 ??
  12. - script ClassHelper -1,{ OnPCLoginEvent: // -- Configuration Option set .npcname$,"[ ^0000FF Class Helper ^000000 ]"; set .InfoMenu,1; // Classes Informations Option [ 0 - Disable / 1 - Enable ] set .1stClassMenu,0; // First Job Class Option [ 0 - Disable / 1 - Enable ] set .2ndClassMenu,1; // Second Job Class Option [ 0 - Disable / 1 - Enable ] set .High1stClassMenu,0; // High 1st Class Option [ 0 - Disable / 1 - Enable ] set .Trans2ndClassMenu,1; // Transcendent Class Option [ 0 - Disable / 1 - Enable ] set .Trans3rdClassMenu,0; // Third Job Class Option [ 0 - Disable / 1 - Enable ] set .ExpandedClassMenu,1; // Expanded Class Option [ 0 - Disable / 1 - Enable ] set .BabyClassMenu,1; // Baby Job Class Option [ 0 - Disable / 1 - Enable ] set .Baby3rdClassMenu,0; // Baby Third Job Class Option [ 0 - Disable / 1 - Enable ] set .Allskills,1; // Complete Skills Option [ 0 - Disable / 1 - Enable ] // -- Usable for Only 1 Time set .Based,1; // [ 0 - Account Based / 1 - Character Based ] if( ClassHelper == 1 || #ClassHelper == 1 ) end; Main_Menu: mes .npcname$; mes "I am the Job Class Helper..."; mes "I am here to help you."; mes " ^FF0000________________________________^000000"; mes "Do you wish to become Stronger ?"; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "Do you admire those who have a great power ? Do you wish to become a part of them ? If yes , then which classes that you admire the most ?"; next; switch(select(( .InfoMenu == 0 )?"":"^4EEE94Classes Information^000000", ( .1stClassMenu == 0 )?"":"^0000FFFirst Job Classes^000000", ( .2ndClassMenu == 0 )?"":"^0000FFSecond Job Classes^000000", ( .High1stClassMenu == 0 )?"":"^0000FFHigh First Job Classes^000000", ( .Trans2ndClassMenu == 0 )?"":"^0000FFTranscendent Job Classes^000000", ( .Trans3rdClassMenu == 0 )?"":"^0000FFThird Job Classes^000000", ( .ExpandedClassMenu == 0 )?"":"^0000FFExpanded Job Classes^000000", ( .BabyClassMenu == 0 )?"":"^0000FFBaby Normal Job Classes^000000", ( .Baby3rdClassMenu == 0 )?"":"^0000FFBaby Third Job Classes^000000", "^FF0000Sorry, i admire nobody....^000000")) { Case 1: goto Classes_info; Case 2: goto FirstJob_Classes; Case 3: goto SecondJob_Classes; Case 4: goto HighFirstJob_Classes; Case 5: goto TransSecondJob_Classes; Case 6: goto TransThirdJob_Classes; Case 7: goto ExpandedJob_Classes; Case 8: goto BabyJob_Classes; Case 9: goto BabyThirdJob_Classes; Case 10: close; } FirstJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Swordman^000000", "^76EE00Magician^000000", "^76EE00Archer^000000", "^76EE00Acolyte^000000", "^76EE00Merchant^000000", "^76EE00Thief^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,1,255,50,60,"All"; Case 2: callsub Job_Changing,2,255,50,60,"All"; Case 3: callsub Job_Changing,3,255,50,60,"All"; Case 4: callsub Job_Changing,4,255,50,60,"All"; Case 5: callsub Job_Changing,5,255,50,60,"All"; Case 6: callsub Job_Changing,6,255,50,60,"All"; Case 7: goto Main_Menu; } HighFirstJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00High Swordman^000000", "^76EE00High Magician^000000", "^76EE00High Archer^000000", "^76EE00High Acolyte^000000", "^76EE00High Merchant^000000", "^76EE00High Thief^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,4002,255,50,60,"All"; Case 2: callsub Job_Changing,4003,255,50,60,"All"; Case 3: callsub Job_Changing,4004,255,50,60,"All"; Case 4: callsub Job_Changing,4005,255,50,60,"All"; Case 5: callsub Job_Changing,4006,255,50,60,"All"; Case 6: callsub Job_Changing,4007,255,50,60,"All"; Case 7: goto Main_Menu; } SecondJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Knight^000000", "^76EE00Priest^000000", "^76EE00Wizard^000000", "^76EE00Blacksmith^000000", "^76EE00Hunter^000000", "^76EE00Assassin^000000", "^76EE00Crusader^000000", "^76EE00Monk^000000", "^76EE00Sage^000000", "^76EE00Rogue^000000", "^76EE00Alchemist^000000", ( Sex == 1 )?"":"^76EE00Dancer^000000", ( Sex == 0 )?"":"^76EE00Bard^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,7,255,50,110,"All"; Case 2: callsub Job_Changing,8,255,50,110,"All"; Case 3: callsub Job_Changing,9,255,50,110,"All"; Case 4: callsub Job_Changing,10,255,50,110,"All"; Case 5: callsub Job_Changing,11,255,50,110,"All"; Case 6: callsub Job_Changing,12,255,50,110,"All"; Case 7: callsub Job_Changing,14,255,50,110,"All"; Case 8: callsub Job_Changing,15,255,50,110,"All"; Case 9: callsub Job_Changing,16,255,50,110,"All"; Case 10: callsub Job_Changing,17,255,50,110,"All"; Case 11: callsub Job_Changing,18,255,50,110,"All"; Case 12: callsub Job_Changing,20,255,50,110,"All"; Case 13: callsub Job_Changing,19,255,50,110,"All"; Case 14: goto Main_Menu; } TransSecondJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Lord Knight^000000", "^76EE00High Priest^000000", "^76EE00High Wizard^000000", "^76EE00Whitesmith^000000", "^76EE00Sniper^000000", "^76EE00Assassin Cross^000000", "^76EE00Paladin^000000", "^76EE00Champion^000000", "^76EE00Professor^000000", "^76EE00Stalker^000000", "^76EE00Creator^000000", ( Sex == 1 )?"":"^76EE00Gypsy^000000", ( Sex == 0 )?"":"^76EE00Clown^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,4008,255,100,130,"All"; Case 2: callsub Job_Changing,4009,255,100,130,"All"; Case 3: callsub Job_Changing,4010,255,100,130,"All"; Case 4: callsub Job_Changing,4011,255,100,130,"All"; Case 5: callsub Job_Changing,4012,255,100,130,"All"; Case 6: callsub Job_Changing,4013,255,100,130,"All"; Case 7: callsub Job_Changing,4015,255,100,130,"All"; Case 8: callsub Job_Changing,4016,255,100,130,"All"; Case 9: callsub Job_Changing,4017,255,100,130,"All"; Case 10: callsub Job_Changing,4018,255,100,130,"All"; Case 11: callsub Job_Changing,4019,255,100,130,"All"; Case 12: callsub Job_Changing,4021,255,100,130,"All"; Case 13: callsub Job_Changing,4020,255,100,130,"All"; Case 14: goto Main_Menu; } TransThirdJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Rune Knight^000000", "^76EE00Warlock^000000", "^76EE00Ranger^000000", "^76EE00Arch Bishop^000000", "^76EE00Mechanic^000000", "^76EE00Guillotine Cross^000000", "^76EE00Royal Guard^000000", "^76EE00Sorcerer^000000", ( Sex == 0 )?"":"^76EE00Wanderer^000000", ( Sex == 1 )?"":"^76EE00Minstrel^000000", "^76EE00Shura^000000", "^76EE00Genetic^000000", "^76EE00Shadow Chaser^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,4060,255,100,200,"All"; Case 2: callsub Job_Changing,4061,255,100,200,"All"; Case 3: callsub Job_Changing,4062,255,100,200,"All"; Case 4: callsub Job_Changing,4063,255,100,200,"All"; Case 5: callsub Job_Changing,4064,255,100,200,"All"; Case 6: callsub Job_Changing,4065,255,100,200,"All"; Case 7: callsub Job_Changing,4073,255,100,200,"All"; Case 8: callsub Job_Changing,4074,255,100,200,"All"; Case 9: callsub Job_Changing,4076,255,100,200,"All"; Case 10: callsub Job_Changing,4075,100,70,200,"All"; Case 11: callsub Job_Changing,4077,100,70,200,"All"; Case 12: callsub Job_Changing,4078,100,70,200,"All"; Case 13: callsub Job_Changing,4079,100,70,200,"All"; Case 14: goto Main_Menu; } ExpandedJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Super Novice^000000", "^76EE00Gunslinger^000000", "^76EE00Ninja^000000", "^76EE00Taekwon^000000", "^76EE00Star Gladiator^000000", "^76EE00Soul Linker^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,23,255,100,110,"All"; Case 2: callsub Job_Changing,24,255,100,600,"All"; Case 3: callsub Job_Changing,25,255,100,60,"All"; Case 4: callsub Job_Changing,4046,255,50,60,"All"; Case 5: callsub Job_Changing,4047,255,100,110,"All"; Case 6: callsub Job_Changing,4049,255,100,110,"All"; Case 7: goto Main_Menu; } BabyJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Baby Swordman^000000", "^76EE00Baby Magician^000000", "^76EE00Baby Archer^000000", "^76EE00Baby Acolyte^000000", "^76EE00Baby Merchant^000000", "^76EE00Baby Thief^000000", "^76EE00Baby Knight^000000", "^76EE00Baby Priest^000000", "^76EE00Baby Wizard^000000", "^76EE00Baby Blacksmith^000000", "^76EE00Baby Hunter^000000", "^76EE00Baby Assassin^000000", "^76EE00Baby Crusader^000000", "^76EE00Baby Monk^000000", "^76EE00Baby Sage^000000", "^76EE00Baby Rogue^000000", "^76EE00Baby Alchemist^000000", ( Sex == 1 )?"":"^76EE00Baby Dancer^000000", ( Sex == 0 )?"":"^76EE00Baby Bard^000000", "^76EE00Baby Baby^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,4024,255,50,60,"All"; Case 2: callsub Job_Changing,4025,255,50,60,"All"; Case 3: callsub Job_Changing,4026,255,50,60,"All"; Case 4: callsub Job_Changing,4027,255,50,60,"All"; Case 5: callsub Job_Changing,4028,255,50,60,"All"; Case 6: callsub Job_Changing,4029,255,50,60,"All"; Case 7: callsub Job_Changing,4030,255,50,110,"All"; Case 8: callsub Job_Changing,4031,255,50,110,"All"; Case 9: callsub Job_Changing,4032,255,50,110,"All"; Case 10: callsub Job_Changing,4033,255,50,110,"All"; Case 11: callsub Job_Changing,4034,255,50,110,"All"; Case 12: callsub Job_Changing,4035,255,50,110,"All"; Case 13: callsub Job_Changing,4037,255,50,110,"All"; Case 14: callsub Job_Changing,4038,255,50,110,"All"; Case 15: callsub Job_Changing,4039,255,50,110,"All"; Case 16: callsub Job_Changing,4040,255,50,110,"All"; Case 17: callsub Job_Changing,4041,255,50,110,"All"; Case 18: callsub Job_Changing,4043,255,50,110,"All"; Case 19: callsub Job_Changing,4042,255,50,110,"All"; Case 20: callsub Job_Changing,4045,255,50,110,"All"; Case 21: goto Main_Menu; } BabyThirdJob_Classes: mes .npcname$; mes "So, i give you a chance now. Which Classes will you choose to join ? Tell me your desired Classes."; next; switch(select("^76EE00Baby Rune Knight^000000", "^76EE00Baby Warlock^000000", "^76EE00Baby Ranger^000000", "^76EE00Baby Arch Bishop^000000", "^76EE00Baby Mechanic^000000", "^76EE00Baby Guillotine Cross^000000", "^76EE00Baby Royal Guard^000000", "^76EE00Baby Sorcerer^000000", ( Sex == 0 )?"":"^76EE00Baby Wanderer^000000", ( Sex == 1 )?"":"^76EE00Baby Minstrel^000000", "^76EE00Baby Shura^000000", "^76EE00Baby Genetic^000000", "^76EE00Baby Shadow Chaser^000000", "^FF0000Back^000000")) { // --- callsub Job_Changing,<JOB>,<BaseLv>,<JobLv>,<Skill>,<Announce>; Case 1: callsub Job_Changing,4096,255,100,200,"All"; Case 2: callsub Job_Changing,4097,255,100,200,"All"; Case 3: callsub Job_Changing,4098,255,100,200,"All"; Case 4: callsub Job_Changing,4099,255,100,200,"All"; Case 5: callsub Job_Changing,4100,255,100,200,"All"; Case 6: callsub Job_Changing,4101,255,100,200,"All"; Case 7: callsub Job_Changing,4102,255,100,200,"All"; Case 8: callsub Job_Changing,4103,255,100,200,"All"; Case 9: callsub Job_Changing,4105,255,100,200,"All"; Case 10: callsub Job_Changing,4104,255,100,200,"All"; Case 11: callsub Job_Changing,4106,255,100,200,"All"; Case 12: callsub Job_Changing,4107,255,100,200,"All"; Case 13: callsub Job_Changing,4108,255,100,200,"All"; Case 14: goto Main_Menu; } Job_Changing: mes .npcname$; mes "You are now a part of ^FF0000"+jobname(getarg(0))+"^000000."; if (compare(getarg(4),"All")){ announce "[ "+strcharinfo(0)+" ] has changed to [ "+jobname(getarg(0))+" ].",bc_all,0x76EE00; } if (compare(getarg(4),"Map")){ announce "[ "+strcharinfo(0)+" ] has changed to [ "+jobname(getarg(0))+" ].",bc_map,0x76EE00; } if (compare(getarg(4),"Area")){ announce "[ "+strcharinfo(0)+" ] has changed to [ "+jobname(getarg(0))+" ].",bc_area,0x76EE00; } if (compare(getarg(4),"Self")){ announce "[ "+strcharinfo(0)+" ] has changed to [ "+jobname(getarg(0))+" ].",bc_self,0x76EE00; } jobchange getarg(0); set BaseLevel,getarg(1); set JobLevel,getarg(2); ResetSkill; ResetStatus; set SkillPoint,getarg(3); if ( .Allskills == 1 ){ atcommand "@allskills"; set SkillPoint,0; } percentheal 100,100; if ( .Based == 0 ){ set #ClassHelper,1; } if ( .Based == 1 ){ set ClassHelper,1; } close; Classes_info: mes .npcname$; mes "=====[^76EE00 Swordman Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Enthusiastic skills in sword fighting is a definite attraction to all teenagers. Easy to control and master character enables most players to be a great player."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Archer Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Long ranged attack ability and special techniques of archers in defeating enemy often lure players to try this."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Mage Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Fascinating element techniques involvement of nature in its abilities is truly amazing with their series of undefeatable magics."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Thief Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Poisoning and dodging abilities will defeat most of the enemy. Maximum defensive and offensive ability caused this character to fearsome one."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Acolyte Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "A supportive character, most of the skills like helping will benefit to teammates who lead to teammates act like a terminator."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Merchant Classes ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Involving communication with other players that emphasizes on battles, intelligence in business dealing. His versatility made him must not be look down."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Super Novice ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "A job who are Advanced after Novice Class. It look alike like a Novice but it is not. Beside that, it can learn most of the skills for all 1st Job Class."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Gunslinger ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "The only Job class in RO who are using Gun as weapon. If are you a Gun Lover , there is no doubt you will choose this Job."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Ninja ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "A mysterious Job Class , who alway processing Ancient Spells , look alike with Mage but not mage , good in PK , can evade very well during PK."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Taekwon ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Just like the name has mentioned. The only class in RO who are not using any Weapon. Attack enemy using barehand and foots. "; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Star Gladiator ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "A class who can use the power of the Sun / Star / Moon. By processing the power of Universe to gain a stronger Power."; mes " ^FF0000________________________________^000000"; next; mes .npcname$; mes "=====[^76EE00 Soul Linker ^000000]====="; mes " ^FF0000________________________________^000000"; mes "^4EEE94Description :^000000"; mes "Class that work like a Shaman, who able to recalling the soul of the dead from the underworld to Boost other class ability."; mes " ^FF0000________________________________^000000"; next; goto Main_Menu; } how to add kagerou job ? please someone edit this for me.
  13. In fact there was a mistake now fixed in the previous post @_@ what mistake ?
  14. if u have been disable it, no need to edit src..
  15. ah soryy. topic close. my bad. need tab. not space.
  16. many thx for this. you are welcome. topic close. haha
  17. char_athena.conf //=================================== // Pincode system //=================================== // NOTE: Requires client 2011-03-09aragexeRE or newer. // A window is opened before you can select your character and you will have to enter a pincode by using only your mouse. // Default: yes pincode_enabled: no
  18. i have load, but nothing happen ??
  19. can someone fix this for rathena ? //===== 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",.@rows); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set .@i,-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY bounty DESC LIMIT "+.@rows+"",@name$,@bounty,.@id); while (.@i < .@rows-1) { set .@i,.@i + 1; mes "^DF0101"+.@id[.@i]+"^000000# ^FA5858"+@name$[.@i]+"^000000 "+@bounty[.@i]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry, it seems I couldn't find "+.@ida+" 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="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; close; end; L_BN: query_sql ("SELECT count(name) FROM bountys",.@rows); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set .@i,-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY name ASC LIMIT "+.@rows+"",@name$,@bounty,.@id); while (.@i < .@rows-1) { set .@i,.@i + 1; mes "^DF0101"+.@id[.@i]+"^000000# ^FA5858"+@name$[.@i]+"^000000 "+@bounty[.@i]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry, but it seems I can't find "+.@ida+" 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="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; close; end; L_BI: query_sql ("SELECT count(name) FROM bountys",.@rows); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set .@i,-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id ASC LIMIT "+.@rows+"",@name$,@bounty,.@id); while (.@i < .@rows-1) { set .@i,.@i + 1; mes "^DF0101"+.@id[.@i]+"^000000# ^FA5858"+@name$[.@i]+"^000000 "+@bounty[.@i]+""; } mes " "; mes "Input the Characters ID you want to set as a Target or read information about:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "+.@ida+" 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="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; 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 "+@sname$+"!"; close; end; } next; mes nn$; mes "I was able to find "+@sname$+". 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,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; 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 ""+@t1$+"",-,""+@t2$+"",L_STS2,""+@t3$+"",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='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target1 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target1$); next; mes nn$; mes "Target 1: "+@target1$+""; 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='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target2 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target2$); mes nn$; mes "Target 2: "+@target2$+""; 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='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target3$); mes nn$; mes "Target 3: "+@target3$+""; close; end; L_stlid: next; mes nn$; mes "Please input an ID:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "+.@ida+" 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="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; close; end; L_ST: next; query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"",@name$); if (@name$ == strcharinfo(0)) { mes nn$; mes "You don't can target yourself."; close; end; } query_sql ("SELECT name FROM bountys WHERE id="+.@ida+""); 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 ""+@t1$+"",-,""+@t2$+"",L_ST2,""+@t3$+"",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="+.@ida+"",@name$); query_sql ("UPDATE bountyladder SET target1='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target1 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target1$); next; mes nn$; mes "Target 1: "+@target1$+""; 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="+.@ida+"",@name$); query_sql ("UPDATE bountyladder SET target2='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target2 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target2$); mes nn$; mes "Target 2: "+@target2$+""; 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="+.@ida+"",@name$); query_sql ("UPDATE bountyladder SET target3='"+@name$+"' WHERE char_id="+getcharid(0)+""); query_sql ("SELECT target3 FROM bountyladder WHERE char_id="+getcharid(0)+"",@target3$); mes nn$; mes "Target 3: "+@target3$+""; 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",.@rows); next; mes nn$; mes "Explantation:"; mes "^DF0101|Positison|^FF0000 |Name| ^FA5858|earned zeny|^000000 |assasinated .. player|"; set .@i,-1; set .@o,0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY earned DESC LIMIT "+.@rows+"",@name$,@eazeny,@kills); while (.@i < .@rows-1) { set .@i,.@i+1; set .@o,.@o+1; mes "^DF0101"+.@o+"^000000 ^FF0000"+@name$[.@i]+" ^FA5858"+@eazeny[.@i]+"^000000 "+@kills[.@i]+""; } close; end; TL_k: query_sql ("SELECT count(name) FROM bountyladder",.@rows); next; mes nn$; mes "Explantation:"; mes "^DF0101|Positison|^FF0000 |Name| ^FA5858|earned zeny| |assasinated .. player|^000000"; set .@i,-1; set .@o,0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY assasinated DESC LIMIT "+.@rows+"",@name$,@eazeny,@kills); while (.@i < .@rows-1) { set .@i,.@i+1; set .@o,.@o+1; mes "^DF0101"+.@o+"^000000 ^FF0000"+@name$[.@i]+" ^FA5858"+@eazeny[.@i]+" "+@kills[.@i]+""; } 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 .@i,-1; set .@o,0; query_sql ("SELECT name,earned,assasinated FROM bountyladder ORDER BY name DESC LIMIT "+.@rows+"",@name$,@eazeny,@kills); while (.@i < .@rows-1) { set .@i,.@i+1; set .@o,.@o+1; mes "^DF0101"+.@o+"^000000 ^FF0000"+@name$[.@i]+" ^FA5858"+@eazeny[.@i]+"^000000 "+@kills[.@i]+""; } 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 "+@sname$+""; } next; mes nn$; query_sql ("SELECT name,earned,assasinated FROM bountyladder WHERE name='"+escape_sql(@sname$)+"'",@name$,@eazeny,@kills); mes "^FF0000"+@name$[0]+" ^FA5858"+@eazeny[0]+"^000000 "+@kills[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",.@rows); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set .@i,-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id DESC LIMIT "+.@rows+"",@name$,@bounty,.@id); while (.@i < .@rows-1) { set .@i,.@i + 1; mes "^DF0101"+.@id[.@i]+"^000000# ^FA5858"+@name$[.@i]+"^000000 "+@bounty[.@i]+""; } mes " "; mes "Please input the ID you wish to delete:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry i'm not found "+.@ida+" Bounty ID."; close; end; } query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; 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="+.@ida+""); mes "Name: "+@verify$+" 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",.@rows); next; mes nn$; mes "Explantation: ^DF0101ID^000000# ^FA5858Name^000000 Bounty"; next; set .@i,-1; query_sql ("SELECT name,bounty,id FROM bountys WHERE onoff=1 ORDER BY id DESC LIMIT "+.@rows+"",@name$,@bounty,.@id); while (.@i < .@rows-1) { set .@i,.@i + 1; mes "^DF0101"+.@id[.@i]+"^000000# ^FA5858"+@name$[.@i]+"^000000 "+@bounty[.@i]+""; } mes " "; mes "Please input the ID of the Bounty you wish to edit:"; input .@ida; if (query_sql ("SELECT name FROM bountys WHERE id="+.@ida+"") == 0) { next; mes nn$; mes "Sorry, but I couldn't find "+.@ida+" ID."; close; end; } query_sql ("SELECT name,bounty,id,des,reason,basexp,jobexp,itemid,itemat FROM bountys WHERE id="+.@ida+"",@name$,@bounty,.@id,@des$,@reason$,@bxp,@jxp,@iid,@iat); next; mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@bounty+""; mes "^04B404Reason^000000: "+@reason$+""; mes "^04B404Description^000000: "+@des$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; 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 "+@iid+"?"; mes "If you input ' 0 ', I'll automatically give out 1."; input @iat; if (@iat == 0) {set @iat,1; next; } } mes "^04B404Bounty ID^000000: "+.@id+""; mes "^04B404Name^000000: "+@name$+""; mes "^04B404Bounty^000000: "+@r+""; mes "^04B404Reason^000000: "+@rea$+""; mes "^04B404Description^000000: "+@d$+""; mes "^04B404BaseExp^000000: "+@bxp$+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404DItemamount^000000: "+@iat+""; mes " "; mes "Is everything fine?"; menu "- Yes",-,"- No",L_no; query_sql ("UPDATE bountys SET des='"+@d$+"',reason='"+@rea$+"',bounty="+@r+",basexp="+@bxp+",jobexp="+@jxp+",itemid="+@iid+",itemat="+@iat+" WHERE id="+.@ida+""); 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: "+@r+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET bounty="+@r+" WHERE id="+.@ida+""); close; end; GM_editreason: next; mes nn$; mes "Please input a reason:"; input @rea$; mes "^04B404Reason^000000: "+@rea$+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET reason="+@rea$+" WHERE id="+.@ida+""); close; end; GM_editdes: next; mes nn$; mes "Please enter a description:"; input @des$; mes "^04B404Description^000000: "+@des$+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET des="+@des$+" WHERE id="+.@ida+""); close; end; GM_editbexp: next; mes nn$; mes "Please input your desired BaseEXP:"; input @bexp; mes "^04B404BaseExp^000000: "+@bexp+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET basexp="+@bexp+" WHERE id="+.@ida+""); close; end; GM_editjexp: next; mes nn$; mes "Please input your desired JobEXP:"; input @jexp; mes "^04B404JobExp^000000: "+@jexp+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET jobxp="+@jexp+" WHERE id="+.@ida+""); close; end; GM_edititemid: next; mes nn$; mes "Please input your desired Item:"; input @iid; mes "^04B404Itemname(ID)^000000: "+@iid+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET itemid="+@iid+" WHERE id="+.@ida+""); close; end; GM_edititemat: next; mes nn$; mes "How much of the item would you like to give?"; input @itemat; mes "^04B404Iteamamount^000000: "+@itemat+""; mes nn$; mes "Is this okay?"; menu "Yes",-,"No",L_no; query_sql ("UPDATE bountys SET itemat="+@itemat+" WHERE id="+.@ida+""); 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"+@pname$+"^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 "+@iid+" 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",.@ik); set .@ikk,.@ik+1; mes "^04B404Bounty ID^000000: "+.@ikk+""; mes "^04B404Name^000000: "+@pname$+""; mes "^04B404Bounty^000000: "+@r+""; mes "^04B404Reason^000000: "+@rea$+""; mes "^04B404Description^000000: "+@d$+""; mes "^04B404BaseExp^000000: "+@bxp+""; mes "^04B404JobExp^000000: "+@jxp+""; mes "^04B404Itemname(ID)^000000: "+getitemname(@iid)+"("+@iid+")"; mes "^04B404Itemamount^000000: "+@iat+""; 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 ("+@cid+",'"+escape_sql(@pname$)+"',"+@r+",1,'"+escape_sql(@d$)+"','"+escape_sql(@rea$)+"',"+.@ikk+","+@bxp+","+@jxp+","+@iid+","+@iat+")"); close; end; } next; mes nn$; mes "Sorry there is a bounty on "+@pname$+"'s head."; close; end; GM_maxzeny: mes nn$; mes "What is your current Maximum of Zeny in the server?"; input .@new; if (.@new == 0) { next; mes nn$; mes "You need to input a number higher than 0!"; next; goto GM_maxzeny; } set $maxzeny,.@new; 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 "+@bexp+" BaseExp.";set JobExp,JobExp+@jexp;} if (@jexp >= 1) {dispbottom "You have earned "+@jexp+" JobExp.";set BaseExp,BaseExp+@bexp;} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "+@iamount+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "+@name$+" and you have got "+@bountyr+" Zeny.";set Zeny,Zeny+@bountyr;} query_sql ("UPDATE bountyladder SET target1='Empty'"); query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"+@bountyr+" WHERE char_id="+getcharid(0)+""); query_sql ("UPDATE bountyladder SET assasinated=assasinated+1 WHERE char_id="+getcharid(0)+""); announce "[Bounty Hunter]:"+@name$+" killed by "+strcharinfo(0)+".",bc_all; end; } else if (@t2$ == @name2$) { if (@bexp >= 1) {dispbottom "You have earned "+@bexp+" BaseExp.";set JobExp,JobExp+@jexp;} if (@jexp >= 1) {dispbottom "You have earned "+@jexp+" JobExp.";set BaseExp,BaseExp+@bexp;} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "+@iamount+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "+@name$+" and you have got "+@bountyr+" Zeny.";set Zeny,Zeny+@bountyr;} query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"+@bountyr+" 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]:"+@name$+" killed by "+strcharinfo(0)+".",bc_all; } else if (@t3$ == @name2$) { if (@bexp >= 1) {dispbottom "You have earned "+@bexp+" BaseExp.";set JobExp,JobExp+@jexp;} if (@jexp >= 1) {dispbottom "You have earned "+@jexp+" JobExp.";set BaseExp,BaseExp+@bexp;} if (@iid >= 501) {getitem @iid,@iamount;dispbottom "You have got "+@iamount+" of "+getitemname(@iid)+"."; } if (@bountyr >= 1) {dispbottom "You have killed "+@name$+" and you have got "+@bountyr+" Zeny.";set Zeny,Zeny+@bountyr;} dispbottom "You have killed "+@name$+" and you have got "+@bountyr+" Zeny."; query_sql ("DELETE FROM bountys WHERE name='"+escape_sql(@name2$)+"'"); query_sql ("UPDATE bountyladder SET earned=earned+"+@bountyr+" 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]:"+@name$+" killed by "+strcharinfo(0)+".",bc_all; } else if (@t1 != @enemy$ & @t2 != @enemy$ & @t3 != @enemy$) { end; } // End Bracket }
×
×
  • Create New...