//===== rAthena Script ======================================= //= Another Item Hunt //===== By: ================================================== //= Akkarin //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Two NPCs that form an Item Hunt event. One is a static NPC //= while the other moves around the map, moaning that he's //= lost something - items at random from array. //===== Additional Comments: ================================= //= 1.0 First Version. Age-old script revamped to use modern //=- functions @.@ //============================================================ prontera,144,178,4 script Jacob 2500,{ close; OnInit: set $FIIN,0; set $FIIA,0; set $FIVAR,0; //============================================================== // CONFIGS START //============================================================== // This is the array of items that the NPCs will ask your players to find. // They must be separated by a comma (,) and cannot contain more than // 127 items. That's the law. End of. setarray $FindItems[0],913,507; // Set the min amount of an item to look for set $FIMIN,5; // Set the max amount of an item to look for set $FIMAX,30; // Set your prize item ID here! set $FIPrize,501; // Set your prize quantity here! set $FIPrizeAmt,2; // Jacob is Jacob by default, but you can change his name here set $FIJname$,"Jacob"; // Colette is Colette by default, but you can change her name here set $FICname$,"Colette"; // GM Level / Group required to start/stop scripts set $FIAuth,80; //============================================================== // CONFIGS END //============================================================== end; OnWhisperGlobal: if (@whispervar0$ == "start") goto L_Start; if (@whispervar0$ == "stop") goto L_Stop; dispbottom $FIJname$ + " : Sorry, i do not recognise that command."; end; L_Stop: set $FIIN,0; set $FIIA,0; set $FIVAR,0; end; L_Start: if (getgmlevel() >= $FIAuth) goto E_begin; dispbottom $FIJname$ + " : Your GM level is not high enough to run this event."; end; E_begin: Announce "[Event]" + $FICname$ + " : Hey guys, a friend of mine is looking abit lost.",8,0x3399FF; sleep 6000; Announce "[Event]" + $FICname$ + " : He's in Prontera and needs your help!",8,0x3399FF; sleep 10000; npcspeed 150; npcwalkto 155,178; sleep 6000; npctalk "Oh no.."; sleep 5000; npctalk "Where did i put them.."; sleep 5000; emotion e_hmm; sleep 3000; npctalk "They must be around somewhere.."; sleep 4000; npcwalkto 155,185; sleep 5000; npctalk "I know they're here somewhere"; sleep 4000; npcwalkto 155,182; sleep 5000; emotion e_sob; sleep 5000; npctalk "Ok.. ok.. Don't panic..."; sleep 3000; npcwalkto 151,182; npctalk "AHHHHHHHHHHHHHHH"; sleep 1000; npcwalkto 158,182; sleep 1000; npcwalkto 151,182; sleep 1000; npcwalkto 158,182; sleep 1000; npcwalkto 155,182; sleep 2000; npctalk "Please.. "; sleep 3000; npctalk "Someone must help me!"; emotion e_sob; sleep 5000; set $FindItemsSize,getarraysize($FindItems); set $@FIIID,rand(0,$FindItemsSize); set $FIIN,$FindItems[$@FIIID]; set $FIIA,rand($FIMIN,$FIMAX); E_jacob1: npctalk "I've lost my "+getitemname($FIIN); sleep 5000; npctalk "Can someone please give them to " + $FICname$ + " for me?"; sleep 5000; npctalk "I feel safer knowing that she's looking after them."; sleep 5000; npctalk "Speak to " + $FICname$ + " and she'll give you more instructions."; set $FIVAR,1; sleep 5000; npcwalkto 144,175; sleep 5000; npcwalkto 144,178; end; } prontera,157,195,5 script Colette 73,{ if ($FIVAR == 1) goto L_Check; mes $FICname$; mes "Hi "+strcharinfo(0)+","; mes "How are you today?"; close; L_Speaking: mes $FICname$; mes "Hold on kiddo, i'm busy giving out instructions."; close; L_Check: mes $FICname$; mes "Have you found "+$FIJname$+"'s "+$FIIA+" "+getitemname($FIIN)+"?"; menu " - Yes",-," - Nope",L_Close; if(countitem($FIIN) < $FIIA) goto L_NoItems; set $FIVAR,0; delitem $FIIN,$FIIA; getitem $FIPrize,$FIPrizeAmt; npctalk "Well done "+strcharinfo(0)+", I shall look after these for "+$FIJname$+"."; Announce "[Event]"+$FICname$+" : "+strcharinfo(0)+" has helped "+$FIJname$+" find his items!",8,0x3399FF; close; L_NoItems: next; mes $FICname$; mes "You don't have the correct amount of items I need."; close; L_Close: close; }