lol it was already explained to you NOT to use playerid. All of the code in the
with <#player#> will cause userid to refer to #player#'s userid. If it is not in the with statement, then it will refer to the player that typed it in. You shouldn't even need $name(#player#)$ at all. Simply use #@player# and it will give you the player's alias (name). You will need the playerid variable to reflect the
attacker's id if the attack variable is refering to the attacker's strength or something.This code should work. To make it easier to code you should use attack as a property. I'll change that. The additional code you wanted added will work if the attack property of Squiggle (set at init or otherwise) is 10000 or whatever. Do this with:
if ( $name(%userid%)$ = Squiggle ) then property <Squiggle; attack=9999>
Put that in the player init.
Change all playerid's to userid. As long as the #player# has a variable attack, you should be safe. So with everything, this is:
command </a #@player#> if property <#quest.currentroom[userid]#; pkon> then {
set numeric <playerid; %userid%>
with <#player#> {
dec <hp[userid]; $objectproperty($name(%playerid%)$>
if ( %hp[userid]% <= 0 ) then {
msg <|bYOU HAVE DIED|xb>
goto <Carbralos Tavern>
set numeric <hp[userid]; 100>
}
else msg <You were attacked and have lost 7 HP.>
}
msg <You attacked #@player# for |b7|xb HP.>
}
else msg <|bYou cant attack here!|xb>
If you want it otherwise, I'm sure you can code it yourself.