Login Form



Who's Online

We have 11 guests online

Statistics

OS : Linux t
PHP : 5.3.29
MySQL : 5.6.36
Time : 06:33
Caching : Disabled
GZIP : Enabled
Members : 3138
Content : 171
Web Links : 6
Content View Hits : 222292

 
SpiderJump PDF Print E-mail
Written by Mithrandir   
Wednesday, 10 February 2010 09:46

Taken from Pilgrim's post:

Spiders jumping down from above and attacking your Players? Fantastic fun! Set the MONSTERCOUNT high and watch them get overwhelmed with scuttling monsters. You see this is why they have Invisibility scrolls. Only the SPIAP2 skelfile has a jumping animation so only SPIDER2 monsters can be generated (or custom SPIDER2 monsters) but the giant spiders have all their jumping animations enabled.

STATE_MACHINE {
KEY {SpiderJump}
COMMENT [Spider that jumps down and attacks when approached by Player (this feature can be disabled by setting the approach radius to zero) and/or message and/or virtual object.]

PARAM {
KEY {1}
TYPE {MONSTER}
DEFAULT {SPIDER2}
COMMENT [Spider generated:]}

PARAM {
KEY {2}
TYPE {INT}
DEFAULT {16}
COMMENT [Maximum spiders generated:]}

PARAM {
KEY {3}
TYPE {INT}
DEFAULT {3}
COMMENT [Approach radius to generate spider (minimum of 2):]}

PARAM {
KEY {4}
TYPE {INT}
DEFAULT {1}
COMMENT [Message to generate spider:]}

PARAM {
KEY {5}
TYPE {OBJECT}
COMMENT [Virtual object to generate spider:]}

PARAM {
KEY {6}
TYPE {SKELNAME}
DEFAULT {SPIAP2}
DISPLAY {}
COMMENT [Quest Editor display:]}

PARAM {
KEY {7}
TYPE {SKELFILE}
DEFAULT {SPIAP2}
COMMENT [Quest Editor display:]}

CODE [
TRAP {
KEY {%0}
FLAG {LIGHT|LIGHTBUFFER|NEEDPOS|SIDEDETECT|HANDLE}
SKELFILE {SPIAP2}

STATE {
KEY {WAIT}
CLEARCOLLID {1}
MULTI {
CONDITION {
COLLIDEX {1,%3,1}
GOTO {COUNT}}
CONDITION {
MSG {%4}
GOTO {COUNT}}
CONDITION {
OBJECT {%5}
GOTO {COUNT}}}}

STATE {
KEY {COUNT}
CLEARCOLLID {1}
MULTI {
CONDITION {
MONSTERCOUNT {%1,%2}
GOTO {COLLID}}
CONDITION {
TIMER {0}
GOTO {WAIT}}}}

STATE {
KEY {COLLID}
CLEARCOLLID {1}
MULTI {
CONDITION {
COLLID {1}
GOTO {WAIT}}
CONDITION {
TIMER {0}
GOTO {DOWN}}}}

STATE {
KEY {DOWN}
SETCOLLID {1}
SKELNAME {SPIAP2}
SKELANIM {DOWN}
ACTION {
SOUND {SPIDERATTACK}}
MULTI {
CONDITION {
ENDANIM {}
GOTO {SPIDER}}}}

STATE {
KEY {SPIDER}
CLEARCOLLID {1}
ACTION {
MONSTER {%1}}
JUMP {WAIT}}

STATE {
KEY {DUMMY}}}]}

 

STATE_MACHINE {
KEY {SpiderJumpGiant}
COMMENT [Giant spider that jumps down and attacks when approached by Player (this feature can be disabled by setting the approach radius to zero) and/or message and/or virtual object.]

PARAM {
KEY {1}
TYPE {MONSTER}
DEFAULT {SPIDW}
COMMENT [Spider generated:]}

PARAM {
KEY {2}
TYPE {INT}
DEFAULT {8}
COMMENT [Maximum spiders generated:]}

PARAM {
KEY {3}
TYPE {INT}
DEFAULT {4}
COMMENT [Approach radius to generate spider (minimum of 4):]}

PARAM {
KEY {4}
TYPE {INT}
DEFAULT {1}
COMMENT [Message to generate spider:]}

PARAM {
KEY {5}
TYPE {OBJECT}
COMMENT [Virtual object to generate spider:]}

PARAM {
KEY {6}
TYPE {LIST}
LIST [(SPIDW) Green and yellow=SPIDW]
LIST [(SPIDX) Bluish grey=SPIDX]
LIST [(SPIDY) Orange and yellow=SPIDY]
DEFAULT [(SPIDW) Green and yellow]
COMMENT [Skelfile:]}

PARAM {
KEY {7}
TYPE {SKELNAME}
DEFAULT {SPIDW}
DISPLAY {}
COMMENT [Quest Editor display:]}

PARAM {
KEY {8}
TYPE {SKELFILE}
DEFAULT {SPIDW}
COMMENT [Quest Editor display:]}

CODE [
TRAP {
KEY {%0}
FLAG {LIGHT|LIGHTBUFFER|NEEDPOS|SIDEDETECT|HANDLE}
SKELFILE {%6}

STATE {
KEY {WAIT}
CLEARCOLLID {2}
MULTI {
CONDITION {
COLLIDEX {1,%3,1}
GOTO {COUNT}}
CONDITION {
MSG {%4}
GOTO {COUNT}}
CONDITION {
OBJECT {%5}
GOTO {COUNT}}}}

STATE {
KEY {COUNT}
CLEARCOLLID {2}
MULTI {
CONDITION {
MONSTERCOUNT {%1,%2}
GOTO {COLLID}}
CONDITION {
TIMER {0}
GOTO {WAIT}}}}

STATE {
KEY {COLLID}
CLEARCOLLID {2}
MULTI {
CONDITION {
COLLIDEX {1,2,7}
GOTO {WAIT}}
CONDITION {
TIMER {0}
GOTO {DOWN}}}}

STATE {
KEY {DOWN}
SETCOLLID {2}
SKELNAME {%6}
SKELANIM {DOWN}
ACTION {
SOUND {SPIDERATTACK}}
MULTI {
CONDITION {
ENDANIM {}
GOTO {SPIDER}}}}

STATE {
KEY {SPIDER}
CLEARCOLLID {2}
ACTION {
MONSTER {%1}}
JUMP {WAIT}}

STATE {
KEY {DUMMY}}}]}