[1] | 1 | //===== eAthena Script ======================================= |
---|
| 2 | //= Shifty Assassin |
---|
| 3 | //===== By: ================================================== |
---|
| 4 | //= acky - god@acky.com |
---|
| 5 | //===== Current Version: ===================================== |
---|
| 6 | //= 1.1.2 |
---|
| 7 | //===== Compatible With: ===================================== |
---|
| 8 | //= eAthena SVN |
---|
| 9 | //===== Description: ========================================= |
---|
| 10 | //= Players buy ninjas to assassinate other players |
---|
| 11 | //===== Additional Comments: ================================= |
---|
| 12 | //= 1.1.1 Changed all gmcommand to atcommand as Poki#3 suggested. [Vicious] |
---|
| 13 | //= 1.1.2 Updated WoE Check. [Paradox924X] |
---|
| 14 | //============================================================ |
---|
| 15 | |
---|
| 16 | morocc,148,86,5 script Shifty Assassin 725,{ |
---|
| 17 | set $ninja_price,250000; |
---|
| 18 | |
---|
| 19 | // STARTS THE MENU // |
---|
| 20 | M_Start: |
---|
| 21 | mes "[Shifty Assassin]"; |
---|
| 22 | mes "What do you want?"; |
---|
| 23 | next; |
---|
| 24 | if (getgmlevel() > 90) goto M_GM; |
---|
| 25 | menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Cancel",M_Exit; |
---|
| 26 | M_GM: |
---|
| 27 | menu "Buy Ninjas",M_Buy,"Assassinate somebody",M_Kill,"Check your Ninjas",M_Check,"Add Ninjas",M_Add,"Cancel",M_Exit; |
---|
| 28 | |
---|
| 29 | // GM MENU TO ADD NINJAS // |
---|
| 30 | M_Add: |
---|
| 31 | mes "[Shifty Assassin]"; |
---|
| 32 | mes "How many ninjas do you want to make available?"; |
---|
| 33 | next; |
---|
| 34 | set @add,0; |
---|
| 35 | input @add; |
---|
| 36 | set $ninja_avail,$ninja_avail+@add; |
---|
| 37 | mes @add + " ninjas added."; |
---|
| 38 | close; |
---|
| 39 | |
---|
| 40 | // BUY NINJAS // |
---|
| 41 | M_Buy: |
---|
| 42 | mes "[Shifty Assassin]"; |
---|
| 43 | mes "How many ninjas do you want buy?"; |
---|
| 44 | mes "There are ^0000FF" + $ninja_avail + "^000000 ninjas available."; |
---|
| 45 | mes "They cost ^0000FF" + $ninja_price + " zeny ^000000each."; |
---|
| 46 | |
---|
| 47 | set @buy,0; |
---|
| 48 | input @buy; |
---|
| 49 | next; |
---|
| 50 | if ($ninja_avail < 1) goto NoNinjas; |
---|
| 51 | if ($ninja_avail < @buy) goto NotEnoughNinjas; |
---|
| 52 | set @price,@buy*$ninja_price; |
---|
| 53 | if (zeny < @price ) goto NoZeny; |
---|
| 54 | |
---|
| 55 | mes "[Shifty Assassin]"; |
---|
| 56 | mes "That will cost you ^0000FF" + @price + " zeny^000000."; |
---|
| 57 | next; |
---|
| 58 | menu "Continue",-,"Cancel",M_Exit; |
---|
| 59 | |
---|
| 60 | set zeny,zeny-@price; |
---|
| 61 | set #ninjas,#ninjas+@buy; |
---|
| 62 | set $ninja_avail,$ninja_avail-@buy; |
---|
| 63 | |
---|
| 64 | mes "[Shifty Assassin]"; |
---|
| 65 | mes "Thank you."; |
---|
| 66 | close; |
---|
| 67 | |
---|
| 68 | // ASSASSINATE SOMEBODY // |
---|
| 69 | M_Kill: |
---|
| 70 | if (agitcheck()) goto M_Busy; |
---|
| 71 | mes "[Shifty Assassin]"; |
---|
| 72 | mes "Enter the name of the target."; |
---|
| 73 | mes "^FF0000Type the name exactly, otherwise I won't be able to find the victim.^000000"; |
---|
| 74 | next; |
---|
| 75 | menu "Continue",-,"Cancel",M_Exit; |
---|
| 76 | set @name$,"0"; |
---|
| 77 | input @name$; |
---|
| 78 | next; |
---|
| 79 | mes "[Shifty Assassin]"; |
---|
| 80 | mes "Active Ninjas: "+#ninjas; |
---|
| 81 | mes "Resting Ninjas: "+#ninjasr; |
---|
| 82 | mes "How many do you want to send?"; |
---|
| 83 | set @number,0; |
---|
| 84 | input @number; |
---|
| 85 | if (@number < 1) goto NoNinjasSent; |
---|
| 86 | if (@number > #ninjas) goto NotEnoughNinjas1; |
---|
| 87 | if (@number > 10) goto TooManyNinjas; |
---|
| 88 | set @chance,rand (1,12); |
---|
| 89 | set #ninjas,#ninjas-@number; |
---|
| 90 | set #ninjas,#ninjas+#ninjasr; |
---|
| 91 | set #ninjasr,0; |
---|
| 92 | if (@number < @chance) goto M_Failure; |
---|
| 93 | |
---|
| 94 | // SUCCESSFUL ATTACK // |
---|
| 95 | mes "Sending ninjas now."; |
---|
| 96 | next; |
---|
| 97 | mes "[Shifty Assassin]"; |
---|
| 98 | set @ninjasurvived,rand (1,@number); |
---|
| 99 | set #ninjasr,@number-@ninjasurvived; |
---|
| 100 | mes "Your attack succeeded but only ^FF0000" + #ninjasr + "^000000 Ninjas survived."; |
---|
| 101 | |
---|
| 102 | atcommand strcharinfo(0) + "@kill "+@name$; |
---|
| 103 | announce @name$+" has been assassinated by " + strcharinfo(0) +"'s Ninjas.",8; |
---|
| 104 | close; |
---|
| 105 | |
---|
| 106 | // FAILED ATTACK // |
---|
| 107 | M_Failure: |
---|
| 108 | mes "Sending ninjas now."; |
---|
| 109 | next; |
---|
| 110 | mes "[Shifty Assassin]"; |
---|
| 111 | set @ninjasurvived,rand (1,@number); |
---|
| 112 | set #ninjasr,@number-@ninjasurvived; |
---|
| 113 | mes "Your attack failed and only ^FF0000" + #ninjasr + "^000000 Ninjas survived."; |
---|
| 114 | |
---|
| 115 | announce @name$+" has survived " + strcharinfo(0) +"'s Ninja attack.",8; |
---|
| 116 | close; |
---|
| 117 | |
---|
| 118 | // NINJAS BUSY FOR WOE // |
---|
| 119 | M_Busy: |
---|
| 120 | mes "[Shifty Assassin]"; |
---|
| 121 | mes "Sorry, all my ninjas are busy doing War of Emperium."; |
---|
| 122 | close; |
---|
| 123 | |
---|
| 124 | // CHECK YOUR NINJAS // |
---|
| 125 | M_Check: |
---|
| 126 | mes "[Shifty Assassin]"; |
---|
| 127 | mes "You have:"; |
---|
| 128 | mes "^FF0000" + #ninjas + "^000000 Active Ninjas."; |
---|
| 129 | mes "^0000FF" + #ninjasr + "^000000 Resting Ninjas."; |
---|
| 130 | next; |
---|
| 131 | goto M_Start; |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | // LIMIT // |
---|
| 135 | NoNinjasSent: |
---|
| 136 | mes "[Shifty Assassin]"; |
---|
| 137 | mes "You can't kill anyone without ninjas."; |
---|
| 138 | next; |
---|
| 139 | goto M_Start; |
---|
| 140 | |
---|
| 141 | TooManyNinjas: |
---|
| 142 | mes "[Shifty Assassin]"; |
---|
| 143 | mes "You can only send 10 ninjas max."; |
---|
| 144 | next; |
---|
| 145 | goto M_Start; |
---|
| 146 | |
---|
| 147 | NoZeny: |
---|
| 148 | mes "[Shifty Assassin]"; |
---|
| 149 | mes "You do not have enough zeny."; |
---|
| 150 | close; |
---|
| 151 | |
---|
| 152 | NotEnoughNinjas: |
---|
| 153 | mes "[Shifty Assassin]"; |
---|
| 154 | mes "There aren't that many ninjas to buy."; |
---|
| 155 | next; |
---|
| 156 | goto M_Start; |
---|
| 157 | |
---|
| 158 | NoNinjas: |
---|
| 159 | mes "[Shifty Assassin]"; |
---|
| 160 | mes "There are no ninjas left to buy."; |
---|
| 161 | close; |
---|
| 162 | |
---|
| 163 | NotEnoughNinjas1: |
---|
| 164 | mes "[Shifty Assassin]"; |
---|
| 165 | mes "You do not have that many ninjas."; |
---|
| 166 | next; |
---|
| 167 | goto M_Start; |
---|
| 168 | |
---|
| 169 | M_Exit: |
---|
| 170 | mes "[Shifty Assassin]"; |
---|
| 171 | mes "Goodbye."; |
---|
| 172 | close; |
---|
| 173 | |
---|
| 174 | // TIMER DELAY NINJA ADDER // |
---|
| 175 | |
---|
| 176 | OnClock0600: |
---|
| 177 | set $ninja_avail,$ninja_avail+2; |
---|
| 178 | end; |
---|
| 179 | |
---|
| 180 | OnClock1200: |
---|
| 181 | set $ninja_avail,$ninja_avail+2; |
---|
| 182 | end; |
---|
| 183 | |
---|
| 184 | OnClock1500: |
---|
| 185 | set $ninja_avail,$ninja_avail+2; |
---|
| 186 | end; |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | OnClock1800: |
---|
| 190 | set $ninja_avail,$ninja_avail+3; |
---|
| 191 | end; |
---|
| 192 | |
---|
| 193 | OnClock1900: |
---|
| 194 | set $ninja_avail,$ninja_avail+2; |
---|
| 195 | end; |
---|
| 196 | |
---|
| 197 | OnClock2000: |
---|
| 198 | set $ninja_avail,$ninja_avail+2; |
---|
| 199 | end; |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | OnClock0000: |
---|
| 203 | set $ninja_avail,$ninja_avail+2; |
---|
| 204 | end; |
---|
| 205 | |
---|
| 206 | OnInit: |
---|
| 207 | set $ninja_avail,$ninja_avail+1; |
---|
| 208 | end; |
---|
| 209 | } |
---|