• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Yellow skull on using an energy wall rune

Sytoxian

New Member
Joined
Aug 19, 2010
Messages
40
Reaction score
1
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.

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
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:
Code:
 doCreatureSetSkullType(cid, skull)
 
Back
Top