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

Lua Critical Strike after click X item

liqeen

Active Member
Joined
Nov 26, 2014
Messages
151
Solutions
1
Reaction score
30
Location
Poland
Well I've been struggling for 3 hours and finally come to conclusion that I can't do it xD
But lets get to the point, I'm trying to do an item that after use gives 50% critical strike damage (tfs implemented critical strike system) but with no success
I managed to create a spell that gives crit and it works but its harder with an action script.

Code:
local gainedCrit = 100
local condition = Condition(CONDITION_ATTRIBUTES)
local condition2 = Condition(CONDITION_PARAM_SKILL_CRITICAL_HIT_DAMAGE)


function onUse(player, item, fromPosition, target, toPosition, isHotkey)
       if item.itemid == 13529 then
       player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You received 100% critical strike damage.")
       condition:setParameter(CONDITION_PARAM_SKILL_CRITICAL_HIT_DAMAGE, gainedCrit)
       combat:setCondition(condition2, 100)
    end
end
^^ thats all I could create

I tried to do it with the spell example but I think thats not a good way XD, also with no success..
So my question is, how can I get player skill critical damage value and link it later on? Is it even possible to link it somehow without source edition?

Im using latest OTX
 
Last edited:
Back
Top