$get(MONSTER_ID,skin) always returns 0, even when a monster isn't using 0.
Skin is a client side->pev property, it'd take quite some effort to allow the server to pull the info. However, it always defaults to 0, and can't be set to anything you didn't set it to in the script, so you should always know what it is.$get(MONSTER_ID,skin) always returns 0, even when a monster isn't using 0.
Related to a potential exploit - the results of which have been fixed, though still need to rework this to figure the core problem.Kanta said:<censored thingie>
I've spent some time on this (mostly trying to figure out how to log vars so I can see what's happening) and narrowed it down to msstring::skip() not working correctly. It happens to work for two of the options, somehow, but fails for the rest, because it returns a malformed string.Related to a potential exploit - the results of which have been fixed, though still need to rework this to figure the core problem.
Skin is a client side->pev property, it'd take quite some effort to allow the server to pull the info. However, it always defaults to 0, and can't be set to anything you didn't set it to in the script, so you should always know what it is.
setvard RENDER_PROPS $get(ent_me,renderprops)
pTarget->pev->scale;
pTarget->pev->rendermode;
pTarget->pev->renderamt;
pTarget->pev->body;
pTarget->pev->skin;
#scope server
{
const EXPLOSION_DISTANCE 120
const EXPLOSION_DAMAGE 100
const EXPLOSION_DAMAGE_FALLOFF 0.2
const EXPLOSION_FORCE 300
const EXPLOSION_TYPE blunt_effect
}
{ game_spawn
name Meshkhar, the Stupid
hp 8000
race vermin
roam 0
width 32
height 96
setmodel monsters/sorc.mdl
}
{ game_heardtext
setvard RETURN_VALUE PARAM1
xdodamage $get(ent_me,origin) EXPLOSION_DISTANCE EXPLOSION_DAMAGE EXPLOSION_DAMAGE_FALLOFF ent_me ent_me none EXPLOSION_TYPE //<target|(src_origin)> <range|aoe|(dest_origin)|direct> <damage> <cth|fall_off> <attacker> <inflciter> <skill|none> <dmg_type> [flag_string]
}
{ game_damaged_other //PARAM1=target_hit PARAM2=dmg PARAM3=dmg_type //items return <attack_callback>_damaged_other
local L_GET_TEXT $func(func_return_said_text)
local L_STR "I will do "
stradd L_STR L_GET_TEXT
stradd L_STR " times more damage than 100."
saytext L_STR
}
{ func_return_said_text
return RETURN_VALUE
}
I understand. I'll probably still use $func(), but just set the returndata back to 1 afterwords. Would this mean though that "return" and "returndata" do the same thing?Hrmm... Not sure how to fix without adding a new property to the base script system. game_damaged_other and few other hard events use the same returndata property. Workaround would be to use the classic callevent method and set a setvard. $func() is neat, but remember it doesn't actually let you do anything you couldn't do before it was put in place - just makes it easier to conceptualized and organize.
{ cast_bolts
if $get(ent_me,isalive)
//callevent BOLT_FREQUENCY cast_bolts
setvard BOLT_CHECKING 0
if !ICE_BLASTING
if !PLAYING_DEAD
//dbg Checking for Boltables
playanim critcal ANIM_BLAST
setvard ICE_BLASTING 1
dodamage $relpos(0,0,0) 2048 0 100% 0 reflective //<----- This is where it does 0 damage
//<target> <range> <dmg> <cth> [type] - swing at target in range (can be obstructed)
setvard ICE_BLASTING 0
}
{ game_dodamage //1: Attack Hit (1/0) 2: Entity Attack hit 3: Start Position 4: End Position
if ( !ICE_BLASTING )
{
if ( !FREEZE_ATTACK )
{
if ( ANIM_ATTACK equals ANIM_SMASH )
{
if( $rand(1,4) == 1 ) applyeffectstack PARAM2 effects/effect_frost 5 $get(ent_me,id) $rand(3,5)
}
}
}
if ( ICE_BLASTING ) //<----- This is where it shoots the projectile at whoever was "hit" by 0 damage
{
if PARAM1
if $get(PARAM2,relationship,ent_me) equals enemy
//dbg Casting Bolt
playsound game.sound.voice 10 SOUND_BOLT
setmovedest PARAM2 9999
tossprojectile PARAM2 500 BOLT_DAMAGE 1 proj_ice_bolt (0,5,50)
}
}
Yeeeah, it's very old script - among the first I did I think, before we got the code to compile, thus it predates xdodamage, damage type control, and $get_tsphere. I was thinking we re-did it at some point, but either I'm confusing it with the Lightning Forged Skeleton, or the fix turned out to be buggy and had to be undone.If you listen, it happens whenever one of those ice things are shot. Looking in the script, it seems that to determine who to shoot it at, it attempts to deal 0 damage in a large area, then whoever it "hit" it will shoot the projectile at. The rejuvenation spell will cancel even on 0 damage.
Sword blocking on some weapons seems a bit broken. For example, I tested it with the unholy blade and while holding right click it will say (when i take 60 damage while wearing no armor) Sword Paired! (60 hp) and Unholy blade absorbed 30 damage so I take 30 damage. I tested also with the shadowfire blade, sword parried (60 hp) and i take 30. No damage is taken if you do a regular parry ontop of sword parrying as normal. But with the sword parry shouldnt I be taking 0 damage then, or is the amount portrayed in parenthesis just wrong?
Also will fix. Gettin to be too many damage types - might need something to make sure we don't miss them like that.Wraiths are vulnerable to acid damage.