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

random addon and summon

vexler222

Active Member
Joined
Apr 22, 2012
Messages
714
Solutions
15
Reaction score
46
Hi, i need 2 scritps, random addon doll (if i use doll IDXXX i get random full addon) and for summon such as rl, but for tfs 0.4 ( player say "summon power" and he get summon, but not for 15 min, but until death
 
In actions.xml add
Code:
<action itemid="XXXX" script="RandAddon.lua"/>
where XXXX is the item id you want to use.
Then add in actions/scripts/

RandAddon.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 if item.itemid == XXXX do
  local Male_Addons = {
   [1] = 000;
   [2] = 000;
   [3] = 000;
  }
  local Female_Addons = {
   [1] = 000;
   [2] = 000;
   [3] = 000;
  }
  if getPlayerSex() == 0 then
   doPlayerAddAddons(cid, Male_Addons[math.random(1, #Male_Addons)])
  elseif getPlayerSex() == 1 then
   doPlayerAddAddons(cid, Female_Addons[math.random(1, #Female_Addons)])
  else
   print("Error: Unknown player sex.")
  end
 end
 return true
end[/B]
Again where XXXX is the item id you want to use.
and replace 000s with the addons you want to add, you can elongate the table by adding
Code:
[x] = addonid;
 
Back
Top