diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-08 21:59:56 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-08 21:59:56 -0200 |
commit | 47f6fad94cdb287805992192ed3553751a3307d6 (patch) | |
tree | 1b8ac3be5258b82268a6f220c3cd9915caf4af00 /npc/001-10-1 | |
parent | 9777343e4371e660d79f24e023130d1bb4e2cda8 (diff) | |
download | serverdata-47f6fad94cdb287805992192ed3553751a3307d6.tar.gz serverdata-47f6fad94cdb287805992192ed3553751a3307d6.tar.bz2 serverdata-47f6fad94cdb287805992192ed3553751a3307d6.tar.xz serverdata-47f6fad94cdb287805992192ed3553751a3307d6.zip |
CoD
Diffstat (limited to 'npc/001-10-1')
-rw-r--r-- | npc/001-10-1/_import.txt | 2 | ||||
-rw-r--r-- | npc/001-10-1/mapflags.txt | 2 | ||||
-rw-r--r-- | npc/001-10-1/scripts.txt | 77 |
3 files changed, 81 insertions, 0 deletions
diff --git a/npc/001-10-1/_import.txt b/npc/001-10-1/_import.txt index f1ee86539..6f5c2b5df 100644 --- a/npc/001-10-1/_import.txt +++ b/npc/001-10-1/_import.txt @@ -1,2 +1,4 @@ // Map 001-10-1: Dust Boss Cave // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/001-10-1/mapflags.txt", +"npc/001-10-1/scripts.txt", diff --git a/npc/001-10-1/mapflags.txt b/npc/001-10-1/mapflags.txt new file mode 100644 index 000000000..48d99d981 --- /dev/null +++ b/npc/001-10-1/mapflags.txt @@ -0,0 +1,2 @@ +001-10-1 mapflag zone MMO +001-10-1 mapflag pvp diff --git a/npc/001-10-1/scripts.txt b/npc/001-10-1/scripts.txt new file mode 100644 index 000000000..0038e9281 --- /dev/null +++ b/npc/001-10-1/scripts.txt @@ -0,0 +1,77 @@ +// TMW2 scripts. +// Authors: +// Jesusalva +// Dusty in a Bottle (aka. Dustynator, Dustman, mr. willbelz) +// Description: +// Scripts for 001-10-1: Boss Fight! + +001-10-1,0,0,0 script #COD_BossManager NPC_HIDDEN,{ + end; + +// Spawn the Dust Boss +OnEventStart: + areamonster("001-10-1", 34, 29, 59, 52, strmobinfo(1, DustBoss), DustBoss, 1, "#COD_BossManager::OnVictory"); + initnpctimer; + end; + +// Dust boss was killed, add timers +OnVictory: + if (getcharid(1) > 0) + .pwin=getcharid(1); + else + .win$=strcharinfo(0); + + maptimer("001-10-1", 100, "#COD_BossManager::OnReward1"); + maptimer("001-10-1", 100, "#COD_BossManager::OnReward2"); + donpcevent("Colonel DUSTMAN::OnCoDEnd"); + end; + +// Handle rewards: 10 dust for winner party on boss room, 1 dust for everyone else +// on boss room, 1 dust for winner party outside boss room +OnReward1: + if ((.pwin > 0 && getcharid(1) == .pwin) || strcharinfo(0) == .awin$) + getitem BottledDust, 10; + else + getitem BottledDust, 1; +OnReward2: + if (.pwin && getcharid(1) == .pwin) + getitem BottledDust, 1; + warp "018-2-1", 24, 29; + end; + +// You ran out of time +OnTimeDefeat: + @COD_CHECKPOINT=0; + if (getmap() ~= "001-10") { + warp "018-2-1", 24, 29; + dispbottom l("COD: Ran out of time!"); + } + end; + +// Must reset for next challenge +OnCleanUp: + .pwin=0; // party winner + .win$=""; // fallback, if char not in party + killmonsterall("001-10-1"); + initnpctimer; + stopnpctimer; + end; + +// Every 20 seconds mobs are created if needed +OnTimer20000: + .@mi=mobcount("001-10-1", "all"); + .@pl=getmapusers("001-10-1"); + .@monsterId=any(DustRifle, DustGatling, DustRevolver); + if (.@pl > (.@mi-2)) + areamonster("001-10-1", 34, 29, 59, 52, strmobinfo(1, .@monsterId), .@monsterId, (.@pl-.@mi+2)); + initnpctimer; + end; + +// Setup +OnInit: + .pwin=0; // party winner + .win$=""; // fallback, if char not in party + end; +} + + |