//===== Happy Scripts ================================== //= Freebee //===== By: ================================================== //= Happy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= Hercules //===== Description: ========================================= // Resettable Freebie Giver. More freeee stuffs! //===== Comments: ============================================ //= Change npc coordinates and item ids/amounts etcs //===== Additional Comments: ================================= //= 1.00 Initial Release //= 1.1 Mordernized deprecated set command lines //= 1.2 Made it account based(1 per accoun) //===== Contact Ifo: ========================================= //= http://hercules.ws/board/user/164-happy/ //============================================================ prontera,100,100,5 script More Free Stuffs 1874,{ mes "[Free Bee]"; mes "Whoooooooo Arrrreeee yooouuuu? bZzz bzZz"; mes "WhatZz dozz youzZ wantZZz?"; if(getgmlevel() >= .GM){ .@i = select("More Free Stuffs!:Leave:Reset Variables"); } else { .@i = select("More Free Stuffs!:Leave"); } switch(.@i) { case 3: next; mes "Are you sure you want to delete"; mes "ALL freebie records?"; if(select("No:Yes")==1) close; next; mes "Wait one Moment..."; mes "....."; query_sql("DELETE FROM `acc_reg_num_db` WHERE `key` = '#hpy_got_freebie'"); .@self = getcharid(3); .@size = query_sql("select account_id from `char` where online = 1", .@aid); for(.@i = 0; .@i<.@size; .@i++) { if(attachrid(.@aid[.@i])){ #hpy_got_freebie = 0; } } attachrid(.@self); mes "Cleared"; close; case 1: next; if (!#hpy_got_freebie) { #hpy_got_freebie = 1; for (.@i = 0; .@i < getarraysize(.hpy_freebie); .@i++) { getitem .hpy_freebie[.@i],.hpy_freebie_amt[.@i]; } mes "Enjoy!"; } else { mes "You already got your free bee!"; } close; case 2: close; } OnInit: /* *CONFIG */ .GM = 99; // Group required to reset setarray .hpy_freebie[0],607,608; // enter the itemids setarray .hpy_freebie_amt[0],3,5; // enter the amount of the items /* on the example above, it gives 3x 607(ygg) and 5x 608(yggseed) */ }