Jump to content

Checkmate

Members
  • Posts

    554
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Checkmate

  1. Wait... Im actually confused... Are you trying to ask 2 question.. ?? First how can i work this with my php // ===== Donation Npc 1.0 ===================== // // ===== Credits : Jhosef and trOn ============ // // ===== Change Logs ========================== // // ============================================ // // ==== NPC Location ========================== // prontera,147,175,4 script Donation NPC 807,{ // === 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$, "Donation Npc"; 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) + "."; mes "^006633 NOTE: ^000000 ^0000FF1 PODS^000000 = ^FF3300 1PESO ^000000 "; next; switch(select("Add Donation 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 Donation System. How can I help you?"; next; switch(Select("View My Donation Code:Enter My Donation 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 Donation 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 Donation 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$+"'"; 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$+"'"; close2; //query_sql "DELETE FROM `donate` WHERE `code`='"+@donate_code$+"'"; set #CASHPOINTS, @Donation_Code$; end; } } else { mes .@npc_name$; mes "This Donation 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"; } If you are using this... all you need is to execute this : on your sql database... Or just running those script cuz i see some OnInit: in those script... Mybe it can autorun automatically... Try asking the older about this pal... Second Breaker Ladder prontera,138,171,4 script Breaker Ladder 885,{ query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='brokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "Hello there "+strcharinfo(0)+", what do you want to do?"; menu "Check Emperium Break Points",-,"View Breaker Ladder",Llad,"Exchange Points",Lex,"Nothing",Lno; next; next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "Hmm, wait a second, i'll go check my records.."; next; mes strcharinfo(0)+"'s Emperium Break Points is ^FF0000"+brokeemp+"^000000 Point(s)"; end; Lno: next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "Suit yourself.."; end; Lex: next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "What points would you like to exchange?"; mes "^FF0000Note: Check your inventory and weight before exchanging with me!"; menu "Emperium Break Points",-,"Nothing",Lno; next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "What do you want to exchange with?"; menu "Billow",-,"Emblem of Solar God",Lesg,"Ripple",Lrip,"Silver Ornament",Lsil,"Wrath of Valkyrie",Lval; next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "You need 50 Breaker Points for this.."; mes "Do you still want Billow?"; menu "Yes",-,"No",Lno; if(brokeemp < 50) goto Lnep; if(brokeemp >= 50) next; mes "Here you go!"; getitem 7091,1; set brokeemp,brokeemp-50; end; Lnep: next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "Not enough points!"; end; Lesg: next; mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "You need 70 Breaker Points for this.."; mes "Do you still want Emblem of Solar God?"; menu "Yes",-,"No",Lno; next; if(brokeemp < 70) goto Lnep; if(brokeemp >= 70) mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "Here you go!"; getitem 7086,1; set brokeemp,brokeemp-70; end; Lrip: mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "You need 50 Breaker Points for this.."; mes "Do you still want Ripple?"; menu "Yes",-,"No",Lno; if(brokeemp < 50) goto Lnep; if(brokeemp >= 50) next; mes "Here you go!"; getitem 7090,1; set brokeemp,brokeemp-50; end; Lval: mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "You need 50 Breaker Points for this.."; mes "Do you still want Wrath of Valkyrie?"; menu "Yes",-,"No",Lno; if(brokeemp < 50) goto Lnep; if(brokeemp >= 50) next; mes "Here you go!"; getitem 7078,1; set brokeemp,brokeemp-50; end; Lsil: mes "[ ^00FF00 Kaspersky ^000000 ]"; mes "You need 50 Breaker Points for this.."; mes "Do you still want Silver Ornament?"; menu "Yes",-,"No",Lno; if(brokeemp < 50) goto Lnep; if(brokeemp >= 50) next; mes "Here you go!"; getitem 7077,1; set brokeemp,brokeemp-50; end; Llad: next; for( set .@x,0; .@x<=9; set .@x,.@x+1 ) { mes "^0000FF"+(.@x+1)+".^000000 "+.@name$[.@x]+" - ^FF0000"+.@count[.@x]+"^000000 Point(s)"; } // .@x starts at 0, but you want to start with '1st', so use (.@x+1) end; } I think you need some sql cmd to execute to make this script running prefectly pal.. Mybe you can ask the owner of this script creator about how to install this script without or with sql queries....
  2. Err... Mybe you can connect it using www.yoursite.com/phpmyadmin ot login into your administrator acc that are connected into your databse... In your database look for some word insert SQL or something like that... Put that cmd And then run it... if it have any problem.. do post here... ^ ^ **Edit** Btw... What was that sql actually?..?
  3. Olaaa rathena community.. I dont know how to start,where to post this topic... Actually... Im having some issue. The issue was when sura 150/50 get CI by glt cross 150/50 no dmg came out from sura body and the sura just spinning. Is that a bug... Btw where did this came from?..? From script or item or equipment.. Im trying to check on putty.exe there wan no error at all... Anyone have this problem??..??
  4. Sir... how about headgear like Alice Dool and other headgear... Still cannot be worn?? How to update their (0x[a-zA-Z0-9]*),2,([0-9]+) ???
  5. Happy Halloween To All & Hari Raya Haj

  6. Sir.. how to set this thig up... im trying this No npc appear... Lol?
  7. Hi.. rAThena... Can someone sharing the simple and working script of save point npc?..?
  8. That was a long explanation.. ^ ^ I just knowing 1 thing and it was your skill are rusty,but its ok sir.. you can still make it perfect.. But mybe need a little practice.. Hope you can make a new one script to share to all rAthena Community.. ^ ^
  9. Thanks sir.. That would be awesome.. I can learn something from this.. ^ ^
  10. King zombie.?? I think.. i have it cuz im trying to disguise like him and its ok... hurmmm... Err... Why was that?..?
  11. Zombie king... I try to use @disguise it and its ok.. its a flying zombie right with a chain and crown on his top iof its head right.... But all player dc... All included vending.. lol... ^ ^
  12. - script zombacolypse -1,{ OnInit: set .weapon,1203; //ItemID of the weapon to make them never miss setarray .prize[0],501,1,1000,3; // [0] = Item ID | [1] = Amount | [2] = Zeny | [3] = Setting ( 0 = Disabled | 1 = Item Prize | 2 = Zeny Prize | 3 = Item+Zeny Prize ) set .auto_zombie,60; //Seconds before someone is auto-zombiefied. set .survival_time,5; //Minutes need to survive to win the event. setarray .mapxy$[0],"5@tower","81","84"; //Yes, use the " " marks when specifying X & Y. Because I'm too lazy to make new variables/array for x&y coorinates. /* [0] is the Zombie King virus (will only appear once). * [0] = Type-1C.3 Living-dead-blood virus ' in latin '). * [1] = Type-X2 Dead Blood Plague virus ' in latin '). * [2] = Type-7MA0 Star Tart Plague virus ' in latin '). * [3] = Type-9R.1 Jelly Brain Vernacular Vein virus ' in latin ' */ setarray .virus$[0],"Type-1C.3 Victus Mortuus Sanguis","Type-X2 Mortuus Sanguinis Pestis","Type-7MA0 Lumen Acerbus Pestis","Type-9R.1 Gelata Cerebrum Vulgari Vena"; set .zombie_kill,5; //How many players must a zombie kill before being revived as a human. *Note - will not affect Zombie King* set .zombie_king,10; //How many players must a zombie king kill before being revived as a human. setarray .zombie_skin[0],1015,1036,1197,1298,1864,1865,1875; //1015 = Zombie | 1036 = Ghoul | 1197 = Zombie Prioner | 1298 = Zombie Master | 1864 = Ragged Zombie | 1865 = Zombie Slaughter | 1875 = Zombie King end; OnClock0000: //Midnight, so fitting OnClock2100: //Add more times as needed. setcell $@map$,98,100,66,100,cell_walkable,0; setcell $@map$,98,100,98,68,cell_walkable,0; while(!.@warp) {query_sql"SELECT `name` FROM `char` WHERE `online`='1' LIMIT 128",.@name$; for(set .@i,0; .@i<getarraysize(.@name$); set .@i,.@i+1) {warpchar .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]),getcharid(0,.@name$[.@i]); setd ".name"+.loop+"$["+.@i+"]",.@name$[.@i];} set .loop,.loop+1; if( getarraysize(.@name$) < 128){set .@warp,1;}} set .playercount, getarraysize( getd(".name"+(.loop - 1)+"$") ); if(.loop>1){set .playercount, ((.loop - 2) * 128) + getarraysize( getd(".name"+(.loop - 1)+"$") );} mapannounce .mapxy$[0],"The Zombacolypse event will begin in '"+.auto_zombie+"' seconds. Get ready to fight for your life!!",bc_map,"0x0000FF"; sleep (.auto_zombie * 1000); set .@a,rand( (.loop - 1) ); attachrid( getcharid(3, getd(".name"+.@a+"$["+( rand( getarraysize( getd(".name"+.@a+"$") ) ) )+"]") ) ); disguise .zombie_skin[6]; set zombie,2; set .playercount,.playercount-1; mapannounce .maxy$[0],strcharinfo(0)+" has become infected with the deadly "+ strtoupper(.virus$[0]) +" virus!! Don't get infected help is on the way!!",bc_map,"0x0000FF"; detachrid; pvpon .mapxy$[0]; set .zombacolypse,1; sleep (.survival_time * 60000); pvpoff .mapxy$[0]; while(.loop>=0) {for(set .@i,0; .@i<getarraysize( getd(".name"+.loop+"$") ); set .@i,.@i+1) {if(attachrid( getcharid(3, getd(".name"+.loop+"$["+.@i+"]")) ) ){ undisguise; percentheal 100,100; if(!zombie && .prize[3]) {if(.prize[3]==1){getitem .prize[0],.prize[1];} if(.prize[3]==2){set zeny,zeny+.prize[2];} if(.prize[3]==3){getitem .prize[0],.prize[1]; set zeny,zeny+.prize[2];}} set zombie,0; if(countitem(.weapon)){delitem .weapon,1;} warp "SavePoint",0,0;}} set .loop,.loop-1;} set .loop,0; setcell $@map$,98,100,66,100,cell_walkable,1; setcell $@map$,98,100,98,68,cell_walkable,1; end; OnPCKillEvent: if(!.zombacolypse){end;} if(zombie){end;} attachrid(killerrid); if(!zombie){end;} set @zkill,@zkill+1; if(@zkill>=.zombie_kill && zombie == 1 || @zkill>=.zombie_king && zombie == 2){set @zkill,0; set zombie,0; undisguise; delitem .weapon,1; set .playercount,.playercount+1;} attachrid(killedrid); atcommand "@alive"; warp .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]); set zombie,1; set .playercount,.playercount-1; if(.playercount<=1){awake "zombacolypse"; end;} disguise .zombie_skin[rand(6)]; monster .mapxy$[0],atoi(.mapxy$[1]),atoi(.mapxy$[2]),strcharinfo(0),.zombie_skin[rand(6)],1; mapannounce .mapxy$[0],strcharinfo(0)+" has become infected with the deadly "+ strtoupper(.virus$[ ( rand(1,getarraysize(.virus$)) ) ]) +" virus!! Don't get infected, help is on the way!!",bc_map,"0x0000FF"; getitem .weapon,1; equip .weapon; OnPCLogoutEvent: set zombie,0; if(countitem(.weapon)){delitem .weapon,1;} } 5@tower mapflag nomemo 5@tower mapflag noteleport 5@tower mapflag nosave 5@tower mapflag nowarp 5@tower mapflag nocommand 5@tower mapflag noicewall 5@tower mapflag nobranch 5@tower mapflag nightenabled 5@tower mapflag nomobloot Actually this script was made by GM Ocean.. But no one seem comment on this script.. So im decide to test it... And found error... The error was look like this... All player already been warp into 5@tower then after 1 minutes it start.. then all player dc... At time zombie appear... all DC... Why was that?..?
  13. GmOcean Your script was awesome... But when some of zombie appear all player was disconnected... Why was that?..? **Im reviving some old script**
  14. Its all in here sr... At the top.. ^ ^ About this modification is i want to learn... ^ ^ Btw here it is : and
  15. Sir...Emistry,,, I trying your script and found some error.. all was working properly but... my char stuck when done talking to both npc...
  16. Thanks guys.. that a lot of explanation... Im trying to understand now.. ^ ^ Thanks to Patskie Lil Troll for help.. ^ ^ Here actually what i need Cluckers.txt Everyday.(Each 12pm,1pm,12am,1am) Code_Breaker.txt Everyday.(Each 5pm,7pm,5am,7am) Dice_event.txt Everyday.(Each 3pm,9pm,3am,9am) Flower_Counting_Game.txt Everyday.(Each(2pm,3pm,4pm,8pm,9pm,10pm) Guess_The_Number.txt Everyday.(Each Saturday Only at (5pm,7pm,5am,7am) FindTheMushroom.txt Everyday.(Each Sunday Only at (5pm,7pm,5am,7am) Trying to make custom of it... ^ ^ And also want learn more about this timing section.. Thanks again... Will help ya.... Lil Troll
  17. Ok i got it sir.. But some of the script did not have space to put this.. i mean mybe will show some error... About this?? if ( ( gettime(7) % 7 ) == 0 ) = 7 mean 7 hours right?..? and OnMinute00: = What this mean?
  18. I dont know where to post this... So i found here some some kind of error mybe... In here latest rathena database.. The position on Namis NPC was in Malangdo.. https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/re/guild/invest_main.txt but In Official iRO was in here How was that?? [[ The different placement of NPC on the map... ]]
  19. I dotn know how to set this... But... What is your rate of your server?..? I mean jlvl and blvl?..?
  20. OK... Mybe all those script... Starting from 12.00am 4.00am 8.00am 12.00pm 5.pm 8.pm Can??...?? Btw i have a question... Since there was 24 hour system.. Is it ok to put not enough 24 hours in OnClock timer?..?
  21. Sry sir Lil Troll I do want to make this mybe 4 hours on each day?..?
  22. Umm... Damn... Im forgot about this... How can i forgot.. Sorry everyone else.. Hurmmm... T.T Btw thanks to Xii and
  23. /* DROP TABLE IF EXISTS `player_count`; CREATE TABLE IF NOT EXISTS `player_count` ( `char_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `count` int(10) unsigned NOT NULL DEFAULT '0', `date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE = MYISAM; */ - script Online_Peak -1,{ OnInit: query_sql "CREATE TABLE IF NOT EXISTS `player_count` (`char_id` int(10) unsigned NOT NULL AUTO_INCREMENT,`count` int(10) unsigned NOT NULL DEFAULT '0',`date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`char_id`)) ENGINE = MYISAM"; OnPCLoginEvent: set .CurrentOnline,getusers(1); query_sql("SELECT `count` FROM `player_count` ORDER BY `count` LIMIT 1",.@CountUsers); set .OnlinePeak,.@CountUsers[0]; if(getarraysize(.@CountUsers) == 0) { set .OnlinePeak,.CurrentOnline; query_sql("INSERT INTO `player_count`(count,date) VALUES("+.OnlinePeak+",NOW())"); } else { if(.CurrentOnline>.OnlinePeak) { set .OnlinePeak,.CurrentOnline; query_sql("UPDATE `player_count` SET count = '"+.OnlinePeak+"', date = NOW()"); announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all; sleep2 3000; announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all; sleep2 3000; announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all; sleep2 3000; announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all; sleep2 3000; announce "[ Players Online :"+.CurrentOnline+" ] We already set a new highest streak of online players!",bc_all; } } end; } Lil Troll Thanks Lil Troll ^ ^ Im gonna test it.. but not now since i so lagging.. lol
  24. Hiii rAthena Community.. ^ ^ I do thinking that is it possible to make Script That Count Highest Streak Player On Server and be announced about 5 time repeatly to tell all player that we all now are already in highest streak player online ?????? Btw.. I do asking this cuz only on almost website RO only shown thier hight streak example on CP FLUX... Now.. Anyone have this script or my some proffesional scripter can come in to sharing some idea's and suggestion... ??
×
×
  • Create New...