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

paralizing echo help plzz one one 111!!

pirl0

Scripter
Joined
Apr 16, 2009
Messages
172
Reaction score
0
Witam drodzy Otlandzianie.
Zrobiłem oto taki skrypt:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 0)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 0)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)



function onUseWeapon(cid, var)
	local ret = doCombat(cid, combat, var)
	local target = variantToNumber(var)
	if(target ~= 0) then
		-- chance
		local chance = math.random(0, 30)
		if(chance > 15) then
		setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
		end
	end
	return ret
end

Na paraliżującą broń.
I mam taki błąd:
Code:
[07/05/2010 22:49:18] [Error - Weapon Interface] 
[07/05/2010 22:49:18] data/weapons/scripts/paralizer.lua:onUseWeapon
[07/05/2010 22:49:18] Description: 
[07/05/2010 22:49:18] (luaSetConditionParam) This function can only be used while loading the script.
Wiem co ten błąd oznacza ale nie w tym rzecz.
Czy dało by rade jakoś zmienić z setConditionParam na changeConditionParam i czy jest to możliwe.
 
Zrob 2x condition, jedno z ticksami, drugie bez i jak cos to wywoluj te drugi ;x
 
@UP
Ale chodzi mi, żeby była szansa np 20% ze zparalizuje.
 
Back
Top