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

Poison Arrow

Captain Orhotek

New Member
Joined
May 20, 2009
Messages
118
Reaction score
1
I was wondering how to make this arrow do more poison dmg as I have always thought it lacked in dmg so was never used. After some searching I found the file with it but I see this

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -1)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end
From what I can tell
Code:
addDamageCondition(condition, 10, 2000, -1)
is the only thing I need to change but I am not sure what exactly to change..
any help would be great
 
Huh ?
Item.xml
Item Id : 2545
<item id="2545" article="a" name="poison arrow" plural="poison arrows">
<attribute key="weight" value="80"/>
<attribute key="attack" value="22"/>
<attribute key="hitChance" value="80"/>
<attribute key="weaponType" value="ammunition"/>
<attribute key="ammoType" value="arrow"/>
<attribute key="shootType" value="poisonarrow"/>
<attribute key="ammoAction" value="removecount"/>
</item>

Give rep++ if i help you man ;)
 
Will the attack value increase the initial damage of the arrow or the poison overall? I am planning on testing it out when I have time but figured I would ask.
 
Will the attack value increase the initial damage of the arrow or the poison overall? I am planning on testing it out when I have time but figured I would ask.

The attack value increases the arrow's damage, the poison damage inflicted is configurable on the script you mentioned on your first post:

LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -1)
setCombatCondition(combat, condition)

function onUseWeapon(cid, var)
    return doCombat(cid, combat, var)
end

There you can change the poison damage by modifying this line:

LUA:
addDamageCondition(condition, 10, 2000, -1)

Being:

  • The 10 means the amount of times the poison will hit before dissapearing.

  • The 2000 means the amount of delay in miliseconds between each poison damage.

  • The -1 is the amount of damage the poison will inflict on the player, being -1 = 1 damage.

So right now the player is getting 1 dmg every 2 seconds and it will hit 10 times before stopping, meaning 10 damage total in 20 seconds.

If you wanted it for example to hit 3 times, once every half second (500 miliseconds) and 30 damage each, you'd write:

LUA:
addDamageCondition(condition, 3, 500, -30)

Or for example, if you wanted it to hit different amounts everytime, like hitting 3 times being first 30 dmg, 2nd 20 dmg and last 10 dmg, each separated 1 second (1000 miliseconds), it'd look like this:

LUA:
local condition = createConditionObject(CONDITION_POISON)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 1, 1000, -30)
addDamageCondition(condition, 1, 1000, -20)
addDamageCondition(condition, 1, 1000, -10)
setCombatCondition(combat, condition)

Hope it helps.
Cheers~
 
Thank you that is exactly what I needed to know. The poison arrow on my server is now something to fear...but to not make it over powered I was looking on how to limit a person to only having one to two on them. The hit chance is now 100 but I dont want people to be able to simply use them over and over...this now makes poison arrows a viable form of pve and pvp along with make people use antidote rune and spell :D

Anyways looking at the
Code:
<attribute key="ammoAction" value="removecount"/>
line can I change remove count to anything else. Such as rumecount all or any way to limit people only having a set amount in their bags..the way around this I thought (hint to the code) is to make one shot remove all poison arrows from the bag.
 
Thank you that is exactly what I needed to know. The poison arrow on my server is now something to fear...but to not make it over powered I was looking on how to limit a person to only having one to two on them. The hit chance is now 100 but I dont want people to be able to simply use them over and over...this now makes poison arrows a viable form of pve and pvp along with make people use antidote rune and spell :D

Anyways looking at the
Code:
<attribute key="ammoAction" value="removecount"/>
line can I change remove count to anything else. Such as rumecount all or any way to limit people only having a set amount in their bags..the way around this I thought (hint to the code) is to make one shot remove all poison arrows from the bag.

Well that one doesnt have to do with ammoAction, also Im not quite sure if thats possible to do too easily, but there's other ways to go around so you can accomplish what you want :thumbup:

For example, you could make it so the spell that makes poison arrows makes only 1 and takes X amount of soulpoints depending on the soul regeneration of your server.

So if you have the regen being 1 soul every 2 minutes, then make it so the spell creates 1 poison arrow and removes 60 soul points from you, so after your soul is out, you can only make 1 poison arrow every 2 hours.

This would require to set the lvlreq for the spell to something high so people dont abuse it by creating new characters only to have 100 soulpoints and make them.

Or maybe put it to take all of your soulpoints and only promoted characters can make them, so it takes 200 soulpoints per 1 poison arrow. And put the respective soul regeneration so 200 SPs regen in 2 hours. Therefore they can only make 1 PA every 2 hours, or they can choose to suicide over and over losing lvls just to make 1 each time.

Another thing would be to remove the spell that makes them and put it as a VERY RARE loot from random hard monsters which would loot them only 1 by 1 and as I said, RARE as hell.

Thats what I can think of right now, you could combine that with new ideas to fit your needs :thumbup:

Cheers~
 
Back
Top