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

Remove Charges

Activity

Member
Joined
Apr 7, 2016
Messages
182
Reaction score
22
Hello i have a problem with charges when i'm using spells that depends on skills like sword/axe etc... my weapon is working like this, you charge the weapon with runes like diamonds in real tibia this is script of the weapon
Action.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 2401 and isInArray({2314}, itemEx.itemid)) then
    doTransformItem(item.uid, 2433, 1)
    doRemoveItem(itemEx.uid, 1)
    return true
elseif(item.itemid == 2433 and isInArray({2314}, itemEx.itemid)) then
    local subtype = item.type
    doTransformItem(item.uid, 2433, subtype+1)
    doRemoveItem(itemEx.uid, 1)
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You may only use it on venvo runes.")
  return true
end
return true
end
i tried to use spell that depends on magic, i found the charges same thing.
1 rune = 1 charge.
TFS 0.4
 
@heba
@Zothion
My problem is that when i cast skills spells like exori hur/mas etc its remove charges from my weapon without attacking in a creature what i need is not remove charges from my weapon when i cast skills spells and my video explains what is the problem.
 
u can post spells.xml for spell remove weapon charge ?
example
Code:
<instant name="Whirlwind Throw" words="exori hur" lvl="15" mana="40" prem="1" range="5" needtarget="1" blockwalls="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/whirlwind throw.lua">
 
I think I understand the issue.
When they cast a spell, that hit's multiple area's, it removes the charges from their weapon, for each area in the combat spell, regardless if it has hit a target.
 
I think I understand the issue.
When they cast a spell, that hit's multiple area's, it removes the charges from their weapon, for each area in the combat spell, regardless if it has hit a target.
I think its the issue.
@heba
Lol told you all spells that depends on skills like exori con/exori hur/exori mas ETC all knight/pally spells.
 
if u used
removeWeaponAmmunition = false
removeWeaponCharges = false
in confing that mean charges doan't remove idk that will help u or no if u will try must restart server
 
if u used
removeWeaponAmmunition = false
removeWeaponCharges = false
in confing that mean charges doan't remove idk that will help u or no if u will try must restart server
Well, i gonna try it when i get home, thanks.
EDIT: but if i did removeWeaponCharges that won't remove Charges when i attack with the weapon, @heba .
 
Last edited:
Back
Top