//===== Akito Script ========================================= //= prologo 1 //===== By: ================================================== //= Akito && Dynasty //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena SVN 3422+(Requires jA Script System) //===== Description: ========================================= //===== Additional Comments: ================================= //============================================================ //======Changeslog============================================ //= 1.0 Work complete //= 1.1 Update foe xmas event //= 1.2 Update for normal events //= 1.3 Upgrade for make it more easy for read //= 1.4 Added some minor things Xz && varX //============================================================ /*CREATE TABLE IF NOT EXISTS `Premios` ( `account_id` int(11) unsigned NOT NULL, `char_id` int(11) unsigned NOT NULL, `premios` varchar(255) NOT NULL default '', ) ENGINE=MyISAM DEFAULT CHARSET=latin1;*/ prontera,144,178,7 script Canjea tickets 562,{ set .@ticket,6302; setarray .@item[1],19514,19533,19535,19544,19519,19518,19522,30901,30902,30903,30904,30905,30906,30907,30908,30909,30910,30911,30912,30913,30914,30915,30911,30916,30917,30918,30919,30920,30921,30922,30923,30924,30925,30926,30911,30911; setarray .@zeny[1],100,1000,10000,100000,1000000,2000000,3000000,4000000,5000000,10000000; setarray .@poringamount[1],1,3,5,7,10; mes "[Eventos Tickets]"; mes "Yo cambio Tickets de Eventos"; mes "y tienes la oportunidad de cambiarlos por las siguentes cosas"; next; switch(select("~ Zeny:~ Hats & OAC:~ Porings Coings")){ case 1://Zeny mes "Puedes ganar estos premios"; for (set .@i,1; .@i= 1 ){ mes "[Eventos Tickets]"; mes "Estas seguro?"; next; switch(select("Si claro:No, otro dia")){ case 1: mes "[Eventos Tickets]"; mes "Aqui vamos!"; sleep2 1000; set .@azar,rand(1,getarraysize(.@zeny)); delitem .@ticket,1; specialeffect2 572; sleep2 300; specialeffect2 610; sleep2 500; specialeffect2 568; set zeny,zeny+.@zeny[.@azar]; npctalk "Has ganado "+.@zeny[.@azar]+"z"; close2; set .@acc_idl, getcharid(3) ; query_sql "SELECT `userid` FROM login WHERE `account_id` = "+ getcharid(3), .@acc_name$; query_sql "INSERT INTO premios (`account_id`,`char_id`,`premios`) VALUES ("+ .@acc_idl +",'"+.@acc_name$+"','"Has ganado "+.@zeny[.@azar]+"z"'"); sleep2 1000; npctalk "Felicidades "+strcharinfo(0)+" Gracias por participar"; end; case 2: mes "[Eventos Tickets]"; mes "Ok vuelve cuando quieras"; close; } }else{ mes "[Eventos Tickets]"; mes "no tienes ningun ticket de eventos"; close; } case 2: mes "[Eventos Tickets]"; mes "vuelve cuando quieras"; close; } case 2://hats mes "Puedes ganar estos premios"; for (set .@i,1; .@i= 1 ){ mes "[Eventos Tickets]"; mes "Estas seguro?"; next; switch(select("Si claro:No, otro dia")){ case 1: mes "[Eventos Tickets]"; mes "Aqui vamos!"; sleep2 1000; mes "Taran!!!"; set .@azar,rand(1,getarraysize(.@item)); delitem .@ticket,1; specialeffect2 572; sleep2 300; specialeffect2 610; sleep2 500; specialeffect2 568; getitem .@item[.@azar],1; npctalk "Has ganado un "+getitemname (.@item[.@azar]) +""; close2; set .@acc_idl, getcharid(3) ; query_sql "SELECT `userid` FROM login WHERE `account_id` = "+ getcharid(3), .@acc_name$; query_sql "INSERT INTO premios (`account_id`,`char_id`,`premios`) VALUES ("+ .@acc_idl +",'"+.@acc_name$+"','"+getitemname (.@item[.@azar]) +"'"); sleep2 1000; npctalk "Felicidades "+strcharinfo(0)+" Gracias por participar"; end; case 2: mes "[Eventos Tickets]"; mes "Ok vuelve cuando quieras"; close; } }else{ mes "[Eventos Tickets]"; mes "no tienes ningun ticket de eventos"; close; } case 2: mes "[Eventos Tickets]"; mes "vuelve cuando quieras"; close; } case 3://Porings coings mes "Puedes ganar estos premios"; for (set .@i,1; .@i= 1 ){ mes "[Eventos Tickets]"; mes "Estas seguro?"; next; switch(select("Si claro:No, otro dia")){ case 1: mes "[Eventos Tickets]"; mes "Aqui vamos!"; sleep2 1000; set .@azar,rand(1,getarraysize(.@poringamount)); delitem .@ticket,1; specialeffect2 572; sleep2 300; specialeffect2 610; sleep2 500; specialeffect2 568; getitem 7539,.@poringamount[.@azar]; npctalk "Has ganado "+.@poringamount[.@azar]+" "+getitemname (7539) +""; close2; set .@acc_idl, getcharid(3) ; query_sql "SELECT `userid` FROM login WHERE `account_id` = "+ getcharid(3), .@acc_name$; query_sql "INSERT INTO premios (`account_id`,`char_id`,`premios`) VALUES ("+ .@acc_idl +",'"+.@acc_name$+"','"+.@poringamount[.@azar]+" "+getitemname (7539) +"'"); sleep2 1000; npctalk "Felicidades "+strcharinfo(0)+" Gracias por participar"; end; case 2: mes "[Eventos Tickets]"; mes "Ok vuelve cuando quieras"; close; } }else{ mes "[Eventos Tickets]"; mes "no tienes ningun ticket de eventos"; close; } case 2: mes "[Eventos Tickets]"; mes "vuelve cuando quieras"; close; } } OnInit: waitingroom "Canjea tus Tickets!",0; end; }