[Scripts] Useful Scripts (List)
Posted: 18 Feb 2021, 22:51
In this post you will see several scripts that can help you in some way:
Converting the char's facing direction from a boolean.
Useful code for converting the char's facing direction from a boolean to normal people numbers :
Name Object Settings with Script as Double.
Converting the char's facing direction from a boolean.
Useful code for converting the char's facing direction from a boolean to normal people numbers :
Code: Select all
dim charfacing as double
charfacing = sgn(-char(1).facing+.5)
'Script by FyreNova
Name Object Settings with Script as Double.
Code: Select all
dim monday as double
dim rabbit as double
dim may as double
dim onion as double
with npc(sysval(param1))
if .ivalc=0 then
.name="monday:19934.158, rabbit:1995, may:2020, onion:2000.4"
call showmsg(getval("onion", .name) )
.ivalc=1
monday = (getval("monday", .name) )
rabbit = (getval("rabbit", .name) )
may = (getval("may", .name) )
onion = (getval("onion", .name) )
end if
end with
script getval(search as string, itsname as string, return double)
if itsname="" then return 0
dim en as string= itsname 'npc(sysval(param1)).name
dim loc as integer =instr(0, en, search & ":")
dim namelen as integer = len(search)+1
if mid(en, loc, namelen) = search & ":" then
return cdbl(mid(en, loc+namelen, 10))
else
return 0
end if
end script
'Create BY NESTED ERNEST