Jump to content

Asheraf

Core Developers
  • Content Count

    252
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Asheraf

  1. it's changed even in the class name probably it's caused by some src mods
  2. same thing even with job change quest ?
  3. you can try the commands made by AnnieRuru http://herc.ws/board/topic/11097-setmobdata-getmobdata/
  4. you could download ranger new sprites from : 160712_2ndcos_ra.gpf
  5. you have to configure conf/network.conf
  6. try this one // ===== Donation Npc 1.0 ===================== // // ===== Credits : Jhosef and trOn ============ // // ===== Change Logs ========================== // // ============================================ // // ==== NPC Location ========================== // prontera,146,172,5 script TopUp 1_M_SIGNMCNT,{ // === Configuration ========================== // set .gms_level, 99; set .code_length,10; // Length for the Donation Code set .code_length2,3; // Length for the Validation Code set .donate_item, 7179; // Donation Item set .@itemORcash, 0; // 0 for Item or 1 for Cash Point set .@npc_name$, "TopUp"; setarray .coupon_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L", "M","N","O","P","Q","R","S","T","U","V","W","X", "Y","Z","0","1","2","3","4","5","6","7","8","9"; setarray .validation_code$[0],"A","B","C","D","E","F","G","H","I","J","K","L", "M","N","O","P","Q","R","S","T","U","V","W","X", "Y","Z","0","1","2","3","4","5","6","7","8","9"; // ==== NPC Talk ============================== // if(getgmlevel() >= .gms_level) goto AdminPanel; if(getgmlevel() < .gms_level) goto PlayerPanel; // ==== Don't Edit This ======================= // set .@stats$,"0"; // ==== Admin Panel =========================== // AdminPanel: mes .@npc_name$; mes "Welcome " + strcharinfo(0) + "."; next; switch(select("Add Redeem Code:Player View:Exit")){ case 1: for(set @i, 0; @i < .code_length; set @i, @i+1){ set @random_char, rand(0,(getarraysize(.coupon_code$)-1)); set @new_donation$, @new_donation$ + .coupon_code$[@random_char]; } for(set @i, 0; @i< .code_length2; set @i, @i+1){ set @random_char, rand(0,(getarraysize(.validation_code$)-1)); set @new_validation$, @new_validation$ + .validation_code$[@random_char]; } mes .@npc_name$; mes "Enter Item Amount:"; input @donate_amount; next; mes .@npc_name$; mes "Coupon added."; query_sql "INSERT INTO `donate` (`code`, `item_amount`,`validation_code`,`status`) VALUES ('"+@new_donation$+"', "+@donate_amount+", '"+@new_validation$+"' , '"+.@stats$+"')"; set @new_donation$, ""; set @new_validation$, ""; next; mes "This is the list of code logs"; query_sql "SELECT `code` , `item_amount` , `validation_code` , `status` FROM `donate` ORDER BY `code` DESC", .@codelist$, .@status$, .@validation$; if(.@codelist){ mes .@npcname$; mes "There are no entrys in the Code List."; close; } else { next; mes .@npcname$; mes "The list will spawn at your main chat box."; dispbottom "Codelist | Amount | Validation"; for(set @ei,0; @ei < getarraysize(.@codelist$); set @ei,@ei + 1){ dispbottom ""+.@codelist$[@ei]+" | "+.@status$[@ei]+" | "+.@validation$[@ei]+" "; } } next; close; case 2: goto PlayerPanel; case 3: mes .@npc_name$; mes "Have a nice day."; close; } // ==== Player Panel ========================== // PlayerPanel: mes .@npc_name$; mes "Welcome to the Redeeming System. How can I help you?"; next; switch(select("View My Redeem Code:Enter My Redeem Code:Exit")) { case 1: mes .@npc_name$; mes "Please enter your Validation Code:"; input @my_code$; next; query_sql "SELECT `validation_code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code$; next; if(@my_code$ == @available_code$){ query_sql "SELECT `code` FROM `donate` WHERE `validation_code` = '"+@my_code$+"'", @available_code2$; mes .@npc_name$; mes "Your Redeem Code is : [^FF7700" + @available_code2$+ "^000000]."; close2; end; } else { mes .@npc_name$; mes "Your Validation Code is Invalid."; close; } case 2: mes .@npc_name$; mes "Please enter your Redeem Code:"; input @donate_code$; next; query_sql "SELECT `code` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donation_code$; query_sql "SELECT `status` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donate_status; if(strtoupper(@donate_code$) == @donation_code$ && @donate_status == 0){ if(.itemORcash == 0){ query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donation_code$; mes .@npc_name$; mes "You get ^0000FF" + getitemname(.donate_item) + " - " + @donation_code$ + " ea.^000000"; query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'"; emotion e_thx; close2; //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'"; getitem .donate_item,@donation_code$; end; } else { query_sql "SELECT `item_amount` FROM `donate` WHERE `code` = '"+@donate_code$+"'", @donation_code$; mes .@npc_name$; mes "You get ^0000FF" + @donation_code$ + " Cash Point.^000000"; query_sql "UPDATE `donate` SET `status`=1 WHERE `code`='"+@donate_code$+"'"; emotion e_thx; close2; //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'"; set #CASHPOINTS, @donation_code$; end; } } else { mes .@npc_name$; mes "This Redeem Code doesn't exist."; close; } case 3: mes .@npc_name$; mes "Have a nice day."; close; } // ============================================ // OnInit: query_sql "CREATE TABLE IF NOT EXISTS `donate` (`code` TINYTEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, `status` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM"; query_sql "CREATE TABLE IF NOT EXISTS `donation` (`name` TEXT NOT NULL, `code` TEXT NOT NULL, `item_amount` INT NOT NULL, `validation_code` TEXT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM"; }
  7. oh yep it's the #KAFRAPOINTS -= @price-@points; i forgot it ^^
  8. @dfabsgwapings try to use this one prontera,137,223,5 script Test 4_F_KAFRA3,{ mes "[Test]"; mes "Please purchase only 1 item at a time to avoid loss of points."; next; mes "[Test]"; mes "Please select a category."; switch(select("Items:Pet Eggs:Headgears")){ case 1: openshop("vote01"); end; case 2: openshop("vote02"); end; case 3: openshop("vote03"); end; } } - trader vote01 1_M_01,{ OnInit: tradertype(NST_CUSTOM); sellitem Red_Potion,2; end; OnCountFunds: setcurrency(#KAFRAPOINTS); end; OnPayFunds: if( #KAFRAPOINTS < @points ) end; #KAFRAPOINTS -= @points; purchaseok(); end; } - trader vote02 1_M_01,{ OnInit: tradertype(NST_CUSTOM); sellitem Red_Potion,2; end; OnCountFunds: setcurrency(#KAFRAPOINTS); end; OnPayFunds: if( #KAFRAPOINTS < @points ) end; #KAFRAPOINTS -= @points; purchaseok(); end; } - trader vote03 1_M_01,{ OnInit: tradertype(NST_CUSTOM); sellitem Red_Potion,2; end; OnCountFunds: setcurrency(#KAFRAPOINTS); end; OnPayFunds: if( #KAFRAPOINTS < @points ) end; #KAFRAPOINTS -= @points; purchaseok(); end; }
  9. try to use this (not tested) prontera,100,100,0 trader Test 1_M_01,{ OnInit: tradertype(NST_CUSTOM); sellitem Red_Potion,2; end; OnCountFunds: setcurrency(#KAFRAPOINTS); end; OnPayFunds: if( #KAFRAPOINTS < @points ) end; #KAFRAPOINTS -= @price-@points; purchaseok(); end; }
  10. also some item/npc sprites you wouldn't find them in kRO so you have to search for them or simply get them from other official servers data(jRO/iRO/aRO/twRO/idRO)
  11. try to set your mysql encoding to utf8_general_ci (worked for me)
  12. download the .c file then follow this http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC
  13. Make sure if you have the item in the correct item_db file (db/re/item_db.conf) or (db/pre-re/item_db.conf) and try to add it on item_db2
  14. use Map Zone Database http://herc.ws/board/topic/302-introducing-hercules-map-zone-database/
  15. This is Hercules github link : https://github.com/HerculesWS/Hercules
  16. Try this one : Script: <" atcommand "@slaveclone "+strcharinfo(0); ">
  17. well i think it should be [Data] 1=mygrf.grf 2=data.grf !!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.