• 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 Weapon Charges.

BBFalcon89

Member
Joined
Jul 1, 2010
Messages
51
Reaction score
10
Where are weapon charges stored saved? Like if i want to have a weapon which decays after being used 200 times, where would i edit it. Because when i edit it in items.xml like for example

Code:
  <item id="2376" article="a" name="sword">
  <attribute key="weight" value="3500" />
  <attribute key="defense" value="12" />
  <attribute key="attack" value="14" />
  <attribute key="weaponType" value="sword" />
  <attribute key="extradef" value="1" />
     <attribute key="charges" value="20" />
     <attribute key="showcharges" value="1" />
     <attribute key="decayTo" value="2376" />
  </item>

It shows me 100 charges that never goes down in game when i make the item and when i buy it its 1 charge that never goes down.
 
Check your config.lua if you have set it to remove weapon charges, tell us which server version it is / where did you get it.
Is the weapon registered in weapons.xml (should be by default if you changed nothing), just check for the id in there.
 
In npc script you must provide additional parameter, which is charges amount.
i.e: name,id,price,count,charges ; (I don't remember the order)
 
it is in Config.Lua
serch for this
Code:
worldType = "pvp"
protectionLevel = 80
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 60 * 1000
huntingDuration = 60 * 1000
criticalHitChance = 27
criticalHitMultiplier = 2
displayCriticalHitNotify = true
removeWeaponAmmunition = false
removeWeaponCharges = true    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
removeRuneCharges = true
whiteSkullTime = 15 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = false
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
oldConditionAccuracy = false
loginProtectionPeriod = 10 * 1000
deathLostPercent = 10
stairhopDelay = 2 * 1000
pushCreatureDelay = 2 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true
 
I'm using TFS 0.3.6 i was trying to find for that line but my config seems to be missing it. I'll try adding that line into my config and see if it helps. Thanks.
 
Back
Top