• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request] Special Addon System

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,673
Reaction score
25
Location
Sweden
Is this possible to do?

A special statue or like tree or some item gives you a special addon?

Like if I click a statue I will get second mage addon?
 
Sure :)

This will remove certain items you need for it like a quest or what ever, but that can be easily removed. This one is for citizen outfit addons.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerItemCount(cid,5909) == 100 then
if item.itemid == 1946 then
	doTransformItem(item.uid,item.itemid-1)
elseif item.itemid == 1945 then
	doTransformItem(item.uid,item.itemid+1)
	end
	if getPlayerSex(cid) == 1 then 
	doPlayerAddOutfit(cid, 128, 1)
	doPlayerAddOutfit(cid, 128, 2)
	doPlayerRemoveItem(cid, 5909, 100)
	else
	doPlayerAddOutfit(cid, 136, 1)
	doPlayerAddOutfit(cid, 136, 2)
	doPlayerRemoveItem(cid, 5909, 100)
	end
	if item.itemid == 1946 then
	doTransformItem(item.uid,item.itemid-1)
	end
	else
	doPlayerSendCancel(cid, "You need 100 white cloths.")
	end
return TRUE
end
 
How do I know which addon is what? xD
And could you post without any items? Just that you have to click on the item to get the addon xd
 
How do I know which addon is what? xD
And could you post without any items? Just that you have to click on the item to get the addon xd

Code:
doPlayerAddOutfit(cid, 128, 1)
	doPlayerAddOutfit(cid, 128, 2)

128 is the looktype, "1" or "2" is the addon.

And no I cba to change it, you can set it to something like 10k which is better than getting it for FREE, they should have to do SOME work for it.

If you want that, change:

Code:
if getPlayerItemCount(cid,5909) == 100 then

to

Code:
if getPlayerItemCount(cid,2160) == 1 then

and
Code:
doPlayerRemoveItem(cid, 5909, 100)

to
Code:
doPlayerRemoveItem(cid, 2160, 1)

and
Code:
doPlayerSendCancel(cid, "You need 100 white cloths.")

to

Code:
doPlayerSendCancel(cid, "This set of addons costs 10k.")
 
Sorry because I'm a newbie at scripting xd
I've got two questions:

1)
How do I connect this with the item(s) in question.
2)
Where/how could I find out which id is which addon?
 
The item code:
Code:
if getPlayerItemCount(cid,5909) == 100 then

(cid,5909) is the item change it to the item id for the item you want them to pay to get it. and == 100 is how many.

No that's not what I mean how to connect the script to the "STATUE" so when a player clicks on it he gets the addon. xd
 
..Seriously? Don't send me PM's about it, I can see the thread fine.

add this in actions.xml;

<action uniqueid="1337" script="other/citizen.lua" />

And make the switch or what ever uniqueid 1337. If not, try "itemid", and if that doesn't work then "actionid"
 
@grehy
Why:
LUA:
	doPlayerAddOutfit(cid, 128, 1)
	doPlayerAddOutfit(cid, 128, 2)
It works just using:
LUA:
	doPlayerAddOutfit(cid, 128, 3)

@Exique
Use this script.. It's more clear.
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
--------------Config
local idaction = 1700 ---- ActionID for the statue or tree.
local oufittypemale = 132 ---- Looktype of the outfit(male).
local oufittypefemale = 140 ---- Looktype of the outfit(female).
local addon = 1 ---------- 1 first addon, 2 second addon, 3 both addon
--------------End config.

      if getPlayerPremiumDays(cid) >= 1 then
            if item.actionid == idaction then                
               doPlayerAddOutfit(cid, outfittypemale, addon)
               doPlayerAddOutfit(cid, outfittypefemale, addon)
               doSendMagicEffect(fromPosition, 19)
            end
      else
          doPlayerSendCancel(cid, "You need premium account.")
      end
	return TRUE
end
 
Back
Top