Deathangel592
Apprentice
Posts: 4
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0
|
Monster quest.
Code:
[itemdef i_stone_Maddness_quest]
defname=i_stone_Maddness_quest
id=i_floor_marble
name= Maddness Quest stone
type=t_normal
on=@create
color=0a32
attr=attr_invis|010
timer=0
return 1
on=@click
message @07a1,3 (invisible)
message @042b,3 <eval(<timer>/60)> minutes till next action.
return 1
on=@timer
if (<tag0.message>==0)
SERV.ALLCLIENTS SYSMESSAGE @07a1 Maddness Plague will start in 10 minutes.
getmoonpoints
tag.hitter=0
tag.hitter_dam=0
try uid.<tag0.bot>.remove
timer=600
tag.message=1
elseif (<tag0.message>==1)
serv.allclients sysmessage @07a1 Moonglow Maddness Has spawned.
serv.allclients sysmessage @07a1 Go to Moonglow and kill Maddness Plague!
try uid.<tag0.cape>.remove
serv.newnpc=c_Maddness_crystal
new.go 4478,1220
serv.newnpc=c_Maddness_crystal
new.go 4494,1207
serv.newnpc=c_Maddness_crystal
new.go 4501,1250
new.tag.stone=<uid>
tag.bot=<new.uid>
getMaddnesspoints
timer=<eval(<eval (60*60*24)+1> )>
tag.message=0
endif
return 1
[function getMaddness]
tag.realpoints +=200
SRC.SYSMESSAGe @53 200 Real points were added to you account!
new.tag.stone=<tag0.stone>
sysmessage @07a3 You have gained Maddness Plague prize!
try uid.<tag0.stone>.tag.cape=<new.uid>
Endif
[function showmyhits]
local.src.uid=<uid>
local.src.hits=<hits>
local.src.str=<str>
local.src.name=<name>
local.src.argn=<eval(<tag0.myhits>)>
forchars 10
if <uid> != <local.src.uid>
if !(<eval(<local.src.hits>-<local.src.argn>)><0)
sysmessage @042b,3 <local.src.name>'s hitpoints [<eval(<local.src.hits>-<local.src.argn>)>/<eval(<local.src.str>)>]
else
sysmessage @042b,3 <local.src.name>'s hitpoints [0/<eval(<local.src.str>)>]
endif
endif
endfor
[function hittertest]
if (<tag0.hitter>)
if (<args>><eval <tag0.hitter_dam>>)
tag.hitter_dam=<eval <args>>
tag.hitter=<tag0.hitter_test>
else
endif
else
tag.hitter_dam=<eval <args>>
tag.hitter=<tag0.hitter_test>
endif
return 1
[function getMaddnesspoints]
forchars 9999
tag.Maddnesshits=0
endfor
[CHARDEF c_Maddness_crystal]
DEFNAME=c_Maddness_crystal
NAME=Skeleton maddness
ID=c_SKELETON_W_AXE
CAN=MT_WALK|MT_RUN
AVERSIONS=t_TRAP,t_eerie_stuff
ARMOR=150
TEVENTS=E_ALL_NPC
TEVENTS=E_Skeletonmaddness
ON=@Create
COLOR=0446
timer=60
STR=15000
DEX=600
STAMINA=0
INT={435 475}
ARCHERY=100.0
PARRYING={45.0 55.0}
MAGICRESISTANCE={105.0 160.0}
TACTICS={45.0 60.0}
WRESTLING={45.0 55.0}
FAME={100 6000}
KARMA={-1999 -4999}
ITEMNEWBIE=i_cherry_bow
HITPOINTS = 5000
NAME = Monster Bow
IF (<BODY>!=c_maddness_crystal)
IF (<TAG0.ARGO> > 5) && (<DISTANCE> < 20)
dorand 2
say @042b COme Over here
say @042b Skull Smasher
enddo
IF (<SRC.FINDID.I_ANTI_RESEND>)
SRC.TAG.XX=1
ENDIF
SRC.GO <P>
SRC.UPDATE
SRC.EFFECT=3,i_fire_column,15,15,1
TAG.ARGO=
ELSE
TAG0.ARGO +=1
ENDIF
ENDIF
IF (<FLAGS>&4)
flags=<flags>&~statf_freeze
findid.i_rune_paralyze.remove
ENDIF
IF (<FINDID.i_monster_cast>)
FINDID.i_monster_cast.TAG.FIZZLE=1
EFFECT 3,14133,5,30,1
ENDIF
on=@death
try uid.<tag0.stone>.tag.hitter=<tag0.hitter>
try uid.<tag0.stone>.tag.hitter_dam=<tag0.hitter_dam>
TRY uid.<tag0.hitter>.tag.stone=<tag0.stone>
TRY uid.<tag0.hitter>.getMaddness
serv.allclients sysmessage @225 <uid.<tag0.hitter>.name>. Killed Maddness Plague and got 200 Real Points!
remove 1
obj.remove
return 1
on=@gethit
if <argn1> > 15
argn1 = <eval({50 100})>
endif
if <argn1> < 1
argn1=1
endif
argn2=0
say @528 -<eval <argn1>>
tag.myhits=<eval <argn1>>
showmyhits
src.tag0.Maddnesshits=<eval(<src.tag0.Maddnesshits>)>+<eval <argn1>>
tag.hitter_test=<src.uid>
hittertest <eval(<src.tag0.Maddnesshits>)>
[EVENTS E_Skeletonmaddness]
ON=@SKILLSTART
if (rand(5)==1)
dorand 3
Skeletonmaddnessdamage <uid>
Skeletonmaddnessparalyze <uid>
MASSDISPEL3
enddo
endif
ON=@GETHIT
if (rand(6)==1)
dorand 3
Skeletonmaddnessdamage <uid>
Skeletonmaddnessparalyze <uid>
MASSDISPEL3
enddo
endif
[FUNCTION SkeletonmaddnessPARALYZE]
say @07a1 Maddness Paralyze
local.src.uid=<uid>
forchars 18
if (<uid> != <local.src.uid>) && (<isplayer>)
if !(<region.flags> & 02000) && !(<flags>&statf_dead) && !(<flags>&statf_stone) && !(<flags>&statf_invul)
damage <eval{40 50)}>,1 <argn1>
spelleffect s_paralyze,10000 <argn1>
endif
endif
endfor
[FUNCTION SkeletonmaddnessDAMAGE]
say @07a1 Maddness Blow
local.src.uid=<uid>
forchars 18
if (<uid> != <local.src.uid>) && (<isplayer>)
if !(<region.flags> & 02000) && !(<flags>&statf_dead) && !(<flags>&statf_stone) && !(<flags>&statf_invul)
damage <eval{50 60)}>,1 <argn1>
effect 3,i_fx_explode_ball,6,31
endif
endif
endfor
[FUNCTION STARTPLAGUE]
SERV.ALLCLIENTS SYSMESSAGE @07a1 Battle versus Maddness Plague has started! GO AND KICK SOME ASS!!!
serv.newnpc C_maddness_crystal
new.p 4394,1208
new.update
serv.newnpc C_maddness_crystal
new.p 4442,1227
new.update
serv.newnpc C_maddness_crystal
new.p 4524,1324
new.update
serv.newnpc C_maddness_crystal
new.p 4569,1302
new.update
serv.newnpc C_maddness_crystal
new.p 4511,1250,5
new.update
SERV.NEWITEM i_moongate_red
NEW.NAME = To Maddness Plague
NEW.TYPE = T_PLAGUE
NEW.ATTR = 010
NEW.P = 1355,1633,50
NEW.COLOR = 0446
VAR.UIDMOONGATE = <NEW.UID>
[TYPEDEF T_PLAGUE]
ON=@STEP
SDIALOG D_PLAGUE
RETURN 1
[DIALOG D_PLAGUE]
320,400
nomove
noclose
resizepic 0 0 3500 400 130
dtext 45 10 50 You want to go Kill Some Plague Monsters?
dtext 45 35 1968 Yes, I Want to Enter!
dtext 45 60 1968 No, I Dont Want to Enter!
radio 20 38 2117 2118 0 1
radio 20 63 2117 2118 0 2
button 70 90 242 241 1 0 0
button 210 90 247 248 1 0 1
[DIALOG D_PLAGUE BUTTON]
ON=1
IF (<argchk[1]> == 1)
IF (<DISTANCE> > 5)
SRC.SYSMESSAGE You're too far from Gate Travel <NAME>.
RETURN 1
ELSE
src.tag.antiresend=<eval <serv.time>+20>
src.removefromview
IF (<SRC.TAG0.ALLY> == 1)
SRC.MOVETO 4454,1165
ELIF (<SRC.TAG0.ALLY> == 2)
SRC.MOVETO 4564,1383
ELSE
SRC.MOVETO <eval 4450+rand(20)>,<eval 1217+rand(20)>
ENDIF
src.update
ENDIF
ELSE
RETURN 1
ENDIF
[eof]
This is the Monster quest I made.
I want to make that when this monster is killed all who hitted him in radius of 20 steps got the prize... Is it possible to do that?
Thank you for help.
|
|
08-17-2014 08:29 PM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
08-18-2014 12:33 AM |
|
|