• 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!

8.4 server cryingdamson-gui

Ralfegor

New Member
Joined
Apr 6, 2008
Messages
297
Reaction score
1
just 1 question
is there anyway i can identify the attacker
like (cid) creature id how i identify the player who attack in 8.4 (attacker)?
 
onCombat is executed always, and onStatsChange only if you score a hit that does damage (not miss/get your hit blocked).
use whichever you prefer
 
tnx but can you modify me this i think i wont take much time
Code:
local energy = createConditionObject(CONDITION_ENERGY)
setConditionParam(energy, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(energy, 5, 2000, -10) 
 
local poison = createConditionObject(CONDITION_POISON)
setConditionParam(poison, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(poison, 5, 2000, -10)
 
local fire = createConditionObject(CONDITION_FIRE)
setConditionParam(fire, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(fire, 5, 2000, -10)

local drunk = createConditionObject(CONDITION_DRUNK)
setConditionParam(drunk, CONDITION_PARAM_TICKS, 40000)
setCombatCondition(combat, condition2)

local para = createConditionObject(CONDITION_PARALYZE)
setConditionParam(para, CONDITION_PARAM_TICKS, 10000)
setConditionParam(para, CONDITION_PARAM_SPEED, -770)
setConditionFormula(para, -9.9, 0, -9.9, 0)
setCombatCondition(combat, para)


function onStatsChange(cid, attacker, type, combat, value)
	if isPlayer(attacker) then
	return doCombat(attacker, combat, var)
	end
end

I want if the attacked is access 1 then the attacker get paralize, drunk poison etc
 
Last edited:
tried to use onCombat(cid, target)
but in creaturescripts.xml i write
Code:
<event type="combat" name="poison" script="poison.lua"/>
and my server says
[25/05/2011 17:38:00] [Error - CreatureEvent::configureEvent] No valid type for creature event.combat
[25/05/2011 17:38:00] [Warning - BaseEvents::loadFromXml] Can not configure event
 
Back
Top