Hello guys, since i failed to manage de defense formula i changed my strategy.
Using TFs 0.4 rev 3777
How can i manage to verify if a player is wearing 2 weapons at the same time, and if so, monsters will deal more damage to him, but only if he is using 2 weapons.
I tryed to search, but got nothing. I made this piece of shi* script, but it does not check if the player is wearing weapons in SLOT_RIGHT and LEFT. Besides it is in creativescripts, and returns infinite loop!
I would like to include the increased damage from monsters under that condition into player.cpp (already have 2 weapons edited and working), but i dont think i can... so if someone can help me out, event with lua, i will appreciate!
Thank you very much.
Using TFs 0.4 rev 3777
How can i manage to verify if a player is wearing 2 weapons at the same time, and if so, monsters will deal more damage to him, but only if he is using 2 weapons.
I tryed to search, but got nothing. I made this piece of shi* script, but it does not check if the player is wearing weapons in SLOT_RIGHT and LEFT. Besides it is in creativescripts, and returns infinite loop!
Code:
function onThink(cid, interval)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
local drunk = createConditionObject(CONDITION_DRUNK)
if isPlayer(cid) == TRUE and getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 12 then
if left.itemid ~= 0 and right.itemid ~= 0 then
if getCreatureCondition(cid, CONDITION_INFIGHT) == true then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Drunk, Infight, Both Hands!')
doAddCondition(cid, drunk)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Nevermind.')
end
end
end
return true
end
I would like to include the increased damage from monsters under that condition into player.cpp (already have 2 weapons edited and working), but i dont think i can... so if someone can help me out, event with lua, i will appreciate!
Thank you very much.