viewing paste Another Item Hunt | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
//===== 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   10000npcspeed    150;    npcwalkto   155,178;    sleep   6000;   npctalk "Oh no.."sleep   5000;   npctalk "Where did i put them..";
    sleep   5000;   emotion e_hmmsleep 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_sobsleep   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;
}
Viewed 1391 times, submitted by Akkarin.