[Request]Freeze Script
Posted: 11 Aug 2016, 10:26
I want to know if theres a script that acully freezes the player if they get hit by a ice ball or somerhing
Official Community of WohlSoft Team
https://wohlsoft.ru/forum/
Code: Select all
dim hitbox as integer = 0
With npc(sysval(Param1))
if (char(1).x > (.x-(char(1).pwidth)) and char(1).x < .x+(char(1).pwidth)) and (char(1).y > .y-(char(1).pheight) and char(1).y < .y+16) and .ivala = 0 and v(checkchar1col) = 0 and char(1).alive = 1 then
Call FXCreate(10,.X,.Y,0,0,32,8,0,1,0)
call audioset(2, 41, 0, "freeze")
v(checkchar1col) = 1
.x = char(1).x
.y = char(1).y
.ivalc = 0
.ivalb = 1
.ivala = 1
elseif (char(2).x > (.x-(char(2).pwidth)) and char(2).x < .x+(char(2).pwidth)) and (char(2).y > .y-(char(2).pheight) and char(2).y < .y+16) and .ivala = 0 and v(checkchar2col) = 0 and sysval(gamemode) = 1 and char(2).alive = 1 then
Call FXCreate(10,.X,.Y,0,0,32,8,0,1,0)
call audioset(2, 41, 0, "freeze")
v(checkchar2col) = 1
.x = char(2).x
.y = char(2).y
.ivalc = 0
.ivalb = 2
.ivala = 1
elseif .ivala = 1 and char(.ivalb).alive = 1 then
.xsp = 0
.ysp = 0
.friendly = 1
.forecolor = rgba(153,204,255,0)
char(.ivalb).x = .x
char(.ivalb).y = .y
char(.ivalb).xsp = 0
char(.ivalb).ysp = 0
char(.ivalb).nomove = 1
char(.ivalb).forecolor = rgba(153,204,255,255)
.ivalc = .ivalc + 1
if .ivalc mod 210 = 0 then
.ivala = 2
elseif .ivalc mod 15 = 0 then
Call FXCreate(80,char(.ivalb).x+(rnd*char(.ivalb).pwidth)-8,char(.ivalb).y-8,0,1,char(.ivalb).pheight,char(.ivalb).pheight/3,0,1,0)
end if
elseif .ivala = 2 or char(.ivalb). alive = 0 then
if v(checkchar1col) = 1 then
v(checkchar1col) = 0
elseif v(checkchar2col) = 1 then
v(checkchar2col) = 0
end if
char(.ivalb).xsp = 0
char(.ivalb).ysp = 0
char(.ivalb).nomove = 0
char(.ivalb).forecolor = rgba(255,255,255,255)
Call NKill(0, 0, 0, 0, 0, 0, 0 ,0)
end if
' if v(checkchar1col) = 1 then
' if v(checkchar2col) = 1 then
' .forecolor = rgba(255,255,0,255)
' else
' .forecolor = rgba(255,0,0,255)
' end if
' elseif v(checkchar2col) = 1 then
' if v(checkchar1col) = 1 then
' .forecolor = rgba(255,255,0,255)
' else
' .forecolor = rgba(0,255,0,255)
' end if
' else
' .forecolor = rgba(255,255,255,255)
' end if
end with