viewing paste Disguise Event v2 | 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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
//===== Athena Script ========================================
//= Disguise Event NPC
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 2.0
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
//= Disguise Event
//===== Additional Comments: =================================
//= Version 1.0 if there are any Bugs please let me know.
//= Version 2.0 Added multiple Rounds, better functionality
//= and check if already someone won the Round.
//============================================================
 
quiz_02,0,0,0   script  DisguiseAnnouncer   -1,{
 
OnClock0300:
OnClock0700:
OnClock1100:    
OnClock1500:
OnClock1900:
OnClock2300:
    set $@Monster,1000+rand(1,323);
    set $MonsterName$,getmonsterinfo($@Monster,0);
    set $@startdisguise,1;
    setnpcdisplay "Disguise Event",795;
    announce "The [Disguise Event] is starting now!",0;
    end;
}
 
quiz_02,305,245,4   script  Disguise Event  795,{
 
set .@npcname$,"[^0000FFDisguise NPC^000000]";
 
if (getgmlevel() >= 60) goto LDisguiseAdmin;
if ($@startdisguise==1) goto LDisguise;
 
    mes .@npcname$;
    mes "Hi, how can i help you?";
    next;
    menu "How does it work?",-,"Cancel.",LCancel;
 
    mes .@npcname$;
    mes "This is an very easy Event.";
    mes "At the beginning of the Event i will disguise myself into a randomly chosen Monster.";
    mes "After i've done that, you've to put the correct Name into the Box.";
    next;
    mes "If the name was correct, you win a Prize! if it was wrong, just try again ;)";
    mes "And that's it! Good luck.";
    close;
    
LCancel:
    close;
 
LDisguiseAdmin:
    mes .@npcname$;
    mes "^FF0000~Hi GM "+strcharinfo(0)+", what can i do for you?~^000000";
    switch(select("Start Event:End Event:Check Prize:Set Prizes:Rounds:Nothing")) {
case 1:
    next;
    mes .@npcname$;
    mes "Would you like to start the Event now?";
    switch(select("Yes:No")) {  
        case 1:
            next;
                set $@Monster,1000+rand(1,323);
                set $MonsterName$,getmonsterinfo($@Monster,0);
                set $@startdisguise,1;
                setnpcdisplay "Disguise Event",795;
                announce "The [Disguise Event] starts now in Comodo!",0;
                close;
        case 2:
            next;
            mes .@npcname$;
            mes "Ok, bye.";
            close;
    }
 
case 2:
    next;
    mes .@npcname$;
    mes "Would you like to End the Event now?";
    switch(select("Yes:No")) {
        case 1:
            next;
                set $@Monster,0;
                set $@Round,0;
                set $@startdisguise,0;
                setnpcdisplay "Disguise Event",795;
                announce "The [Disguise Event] has been ended by an GM! There will be no prizes!",0;
                close;              
        case 2:
            next;
            mes .@npcname$;
            mes "Ok, bye.";
            close;
    }
 
case 3:
    next;
    mes .@npcname$;
    mes "^FF0000~The current winning Prize is ^000000 ^008000"+$prize_item_amount+" "+getitemname($prize_item_id)+".^000000";
    next;
    goto LDisguiseAdmin;
 
case 4:
    next;
    mes .@npcname$;
    mes "^FF0000~What should the Prize be? Please insert the Item ID.~^000000";
    input $prize_item_id;
    next;
    mes .@npcname$;
    mes "^FF0000~Now the amount?~^000000";
    input $prize_item_amount;
    next;
    mes .@npcname$;
    mes "^FF0000~So, the Prize is^000000 ^008000"+$prize_item_amount+" "+getitemname($prize_item_id)+"^000000? ^FF0000Great.~^000000";
    emotion 33;
    next;
    goto LDisguiseAdmin;
 
case 5:
    next;
    mes .@npcname$;
    mes "Here you can set how many Rounds will be played each time the Event Starts";
    input $Rounds;
    next;
    mes "^FF0000~So, there will be ^FF0000"+$Rounds+" Rounds played.^000000";
    next;
    goto LDisguiseAdmin;
 
case 6:
    next;
    mes .@npcname$;
    mes "Ok, bye.";
    close;
}
 
LDisguise:
    mes .@npcname$;
    mes "Insert the correct Monstername ;)";
    input $@MonsterInput$;
    if ($@disguisewin==1) {
    mes "Someone already won this Round!!";
    close;
    }
    if($@MonsterInput$==$MonsterName$) goto LCorrect;
    if($@MonsterInput$!=$MonsterName$) goto LCancel;
    close;
 
LCorrect:
    announce ""+strcharinfo(0)+" won! I was disguised as: "+$MonsterName$+"",0;
    getitem $prize_item_id,$prize_item_amount;
    set $@Round,$@Round+1;
    set $@disguisewin,1;
    if ($@Round!=$Rounds) goto LRound;
    if ($@Round==$Rounds) goto LGameover;
    set $@startdisguise,0;
    setnpcdisplay "Disguise Event",795;
    close;
 
LRound:
    set $@Monster,1000+rand(1,323);
    set $MonsterName$,getmonsterinfo($@Monster,0);
    set $@disguisewin,0;
    setnpcdisplay "Disguise Event",$@Monster;
    close;
 
LGameover:
    set $@Round,0;
    set $@startdisguise,0;
    set $@disguisewin,0;
    setnpcdisplay "Disguise Event",795;
    npctalk "Thank you all for playing. That was the last round of the Disguise Event. See you next time.";
    close;
}
Viewed 3636 times, submitted by Guest.