• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action [ADDON] Get Addon on statue Click

King Simon

Learning Lua
Joined
Jul 29, 2013
Messages
16
Reaction score
3
Hey guys i recently joined Otland and i thought id start off by giving these scripts.

I remember alot of people asking me for this script. So it is basically you get an addon if you click on a certain item.

Ok so first of all you need to add this in actions.xml:
Code:
<!-- Addons from statues -->
<action uniqueid="3000" script="addons/hunter.lua" />
<action uniqueid="3005" script="addons/citizen.lua" />
<action uniqueid="3010" script="addons/mage.lua" />
<action uniqueid="3015" script="addons/knight.lua" />
<action uniqueid="3020" script="addons/nobleman.lua" />
<action uniqueid="3025" script="addons/summoner.lua" />
<action uniqueid="3030" script="addons/warrior.lua" />
<action uniqueid="3035" script="addons/barbarian.lua" />
<action uniqueid="3040" script="addons/druid.lua" />
<action uniqueid="3045" script="addons/wizard.lua" />
<action uniqueid="3050" script="addons/oriental.lua" />
<action uniqueid="3055" script="addons/pirate.lua" />
<action uniqueid="3060" script="addons/assassin.lua" />
<action uniqueid="3065" script="addons/beggar.lua" />
<action uniqueid="3070" script="addons/shaman.lua" />
<action uniqueid="3075" script="addons/norseman.lua" />
<action uniqueid="3080" script="addons/nightmare.lua" />
<action uniqueid="3085" script="addons/jester.lua" />
<action uniqueid="3090" script="addons/brotherhood.lua" />
<action uniqueid="3095" script="addons/demonhunter.lua" />
<action uniqueid="4000" script="addons/yalaharian.lua" />
<action uniqueid="4005" script="addons/warmaster.lua" />

Next you need to add this package to your actions/scripts:

View attachment addons.rar


What you want to do is go in your map editor and make the item which will give you the addons have a specific unique id. Each Unique id corresponds to an addon:

For example: If you make a statue have a uniqueid of 3085, then when a player clicks on the statue they will get the jester addon and so on. Look in the actions.xml code snippet to see which id's correspond to which addons.

I take no credit for the codes. i just happened to have them.
Rep++ if i helped or just leave a comment :)
 
Well i guess im just giving it to the people who dont want to download an entire server. and i also sort of explain how to add it to the server
 
well does it add only the addons or the outfit as well?

- - - Updated - - -

how do I add an outfit?
 
well does it add only the addons or the outfit as well?

- - - Updated - - -

how do I add an outfit?


To add the outfits you most likely have to give the players premium. If you do not want to do that go into Data/XML/Outfits.xml and you want to change where it says premium="yes" to no or just remove the premium section. I hope i helped

If i missunderstood please correct me
 
The problem is any character can wear all outfits. I want it like RL, you have the standard premium outfits, but you have to make quests to get other outfits like assassin and pirate. I guess this is in outfits.xml, but changing the "default" and "enable" variables dont seem to work.
 
You could also add a check in lua onUse to check if the player is premium or not. And then if they aren't premium just return a message saying they need premium.
 
Why 30 different scripts when they can be done into one? :s
 
Haha sorry im new to scripting which is why i couldnt give the best answer :)
 
Back
Top