proc
PvP(mob/M, mob/H)
if(..())
if(H.monstermove)
var/monsterspawn/S = new H.monstermove
if(S)
var/battlefield/A
for(var/battlefield/b in world)
if(b.fieldtype==S.fieldtype)
if(!b.inuse)
A = b
break
if(A)
H.xx = H.x
H.yy = H.y
H.zz = H.z
M.xx = M.x
M.yy = M.y
M.zz = M.z
H.loc = A.loc
H.frozen = 1
M.frozen = 1
M.loc = A.loc
H.client.edge_limit = "[H.x-7],[H.y-3] to [H.x+7],[H.y+3]"
M.client.edge_limit = "[M.x-7],[M.y-3] to [M.x+7],[M.y+3]"
H.x -= 2
M.x += 2
H.dir = EAST // set their directions
M.dir = WEST
H.inbattle = 1
M.inbattle = 1
H << sound('music/dq6-battle.mid',1,channel=1, volume=75)
M << sound('music/dq6-battle.mid',1,channel=1, volume=75)
Head()
H.stb += 4
M.stb += 4
new /battle_sorters (A.loc, H, M)
new /battle_sorters (A.loc, M, H)
Child_Girl
icon_state = "Girl"
head = /obj/Heads/HGirl/
human = 1
monster = null
Level = 1
Class = "Child"
HP = 28
MaxHP = 28
MP = 0
MaxMP = 0
Power = 11
Agility = 3
Speed = 6
Wisdom = 5
Style = 5
Attack = 11
Defense = 3
GoldReward = null
ExpReward = null
DblClick()
if(usr in oview(src, 1))
PvP(usr,src)
Problem description:
I wanted to intiate a PvP battle when someone was double clicked by another but i keep getting the run time error..
runtime error: Cannot execute null.PvP().
proc name: PvP (/proc/PvP)
source file: battle.dm,527
usr: Newen (/mob/players/Child_Boy)
src: null
call stack:
PvP(Newen (/mob/players/Child_Boy), Golm (/mob/players/Child_Boy))
Golm (/mob/players/Child_Boy): DblClick(the grass2 (16,21,1) (/turf/ground/grass/grass2))
- GhostAnime