strutZ
Australian OT Member {AKA Beastn}
- Joined
- Nov 16, 2014
- Messages
- 1,391
- Solutions
- 7
- Reaction score
- 550
Hello Otland!
I have converted my change weapon damage script to use @Non Sequitur modal window system which can be found HERE
You will have to install that in order to be able to use this system.
Why use this one instead?
Much cleaner then the last version you just need to add the action script and the lib files. There is no need to register the scripts on login.lua or add creaturescripts!
It also has a much better damage system which can be easily configured.
Information on the system
It has an easy config section for you to customize it how you would like it! You just need to fill out the config table found in the action script (pictured below)
Installation
1) Install the modal window helper HERE
2) Register the script in /data/actions/actions.xml by adding this line (Replacing "ITEMID" with the item you want to use: (Note you can use an action ID aswell)
3) Create a new text document in /data/actions/scripts and name it "weapon_damage.lua" and paste the following:
http://pastebin.com/hqR2eihZ
4) Add the following line to your global.lua:
5) Create a new text document in /data/lib/ and name it "weapon_damage.lua" and paste the following:
http://pastebin.com/M9GFYJ4A
6)Register the script in /data/weapons/weapons.xml by adding this line (Replacing "ITEMID" with the item you want to use:
7) Create a new text document in /data/weapons/scripts and name it "weapon_damage.lua" and paste the following:
http://pastebin.com/78fW9Wq9
Enjoy =)
I have converted my change weapon damage script to use @Non Sequitur modal window system which can be found HERE
You will have to install that in order to be able to use this system.
Why use this one instead?
Much cleaner then the last version you just need to add the action script and the lib files. There is no need to register the scripts on login.lua or add creaturescripts!
It also has a much better damage system which can be easily configured.
Information on the system
It has an easy config section for you to customize it how you would like it! You just need to fill out the config table found in the action script (pictured below)
Lua:
-- Config
-- Set wand how the wand deals damage
DamageTypeWand = {
values = true, -- If this is set to true then it will use the min and max values. If set to false the wand will use the formula
-- Damage Values min/max
wandMinDam = 20,
wandMaxDam = 50,
-- Damage Formula
formula = {
wandMinDam = function(level, maglevel) return -((level / 5) + (maglevel * 1.4) + 8) end,
wandMaxDam = function(level, maglevel) return -((level / 5) + (maglevel * 2.2) + 14) end,
}
}
-- Modal window config and storage id
local config = {
storage = "10009",
titleMsg = "Change Weapon Damage Type",
mainMsg = "Choose a damage type from the list",
-- End Config
Installation
1) Install the modal window helper HERE
2) Register the script in /data/actions/actions.xml by adding this line (Replacing "ITEMID" with the item you want to use: (Note you can use an action ID aswell)
XML:
<action itemid="ITEMID" script="weapon_damage.lua"/>
http://pastebin.com/hqR2eihZ
4) Add the following line to your global.lua:
Lua:
dofile('data/lib/weapon_damage.lua')
http://pastebin.com/M9GFYJ4A
6)Register the script in /data/weapons/weapons.xml by adding this line (Replacing "ITEMID" with the item you want to use:
XML:
<wand id="25249" level="300" mana="20" script="weapon_damage.lua">
<vocation name="Sorcerer" />
</wand>
http://pastebin.com/78fW9Wq9
Enjoy =)
Last edited: