Hello everyone,
I always get a yellow skull, when I create an energy wall (with the rune) and walk over it.
The player recieves the message "you los X hitpoints due to an attack by PLAYERNAME" as well. So, the player gets damage by himself, which is not normal I guess.
Moreover I tried the following script (taken from doc\LUA_FUNCTIONS):
However, I alwasy got the last cancel (don't have any skull). Is there something wrong with my source? I'm using cryngdamson 0.3.6pl1.
Edit:
This function doesn't work too:
I always get a yellow skull, when I create an energy wall (with the rune) and walk over it.
The player recieves the message "you los X hitpoints due to an attack by PLAYERNAME" as well. So, the player gets damage by himself, which is not normal I guess.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1495)
local area = createCombatArea(AREA_WALLFIELD, AREADIAGONAL_WALLFIELD)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Code:
<rune name="Energy Wall" id="2268" allowfaruse="1" aggressive="0" charges="3" lvl="45" maglv="15" exhaustion="2000" blocktype="solid" event="script" value="runes/energy wall.lua"/>
Moreover I tried the following script (taken from doc\LUA_FUNCTIONS):
Code:
function onSay(cid, words, param, channel)
local skullNames = {"Yellow", "Green", "White", "Red", "Black"}
local creatureSkull = getCreatureSkullType(cid)
if creatureSkull ~= SKULL_NONE then
doPlayerSendCancel(cid, "Your current skull color is " .. skullNames[creatureSkull] .. ".")
else
doPlayerSendCancel(cid, "You don't have any skull :(")
end
end
Edit:
This function doesn't work too:
Code:
doCreatureSetSkullType(cid, skull)