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

TFS 1.2-1.3 addon doll action item

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
921
Location
Chile
Hello guys, i really need an addon doll that when you right click it, it gives you a random first or second addon from a random outfit, so only 1 addon from a random outfit

and other that gives you the full first and second addon from a random outfit plzzzz

much appreciated!!



PS: couldn't find any in any otserv website, only talkactions addon dolls :(
 
What itemid is the addon doll?
Could you give me a list of male and female outfit ids/looktypes?
 
Addon Doll in TFS 1.0
you can look at this for inspiration. simply replace onsay.. with function onUse(player, item, fromPosition, target, toPosition, isHotkey)
and remove the rest of the logic associated with the talkaction and replace it with your wanted logic
 
Idk if this is the best way or not, but I wanted to explain my idea and see if anyone has a better solution?

-- First script
First you cycle through all available outfits for the player and check what addons they require, and store them in a temporary table.
Then you just randomly pick one out of the temp table.
If the table is empty, return false.

-- Second script
First you cycle through all available outfits for the player and check what addons they require, and store them in a temporary table, however you don't add it to the table if they already own 1/2 addons.
Then you just randomly pick one out of the temp table.
If the table is empty, return false.

Would anyone do it differently?
I'm just curious.
 
Back
Top