• 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 [Request] Addon By Item

MindFreak

Titanium Staff
Joined
Jan 18, 2009
Messages
59
Reaction score
0
T.ex Small Diamond -> Right Click -> First Beggar Addon


Hope you understand what i want, Thanks in advance.
 
The script: (data/actions/scripts/smalldiamond.lua)
PHP:
function onUse(cid, item, frompos, item2, topos)
		 doPlayerAddOutfit(cid, 153, 1)
		 doPlayerAddOutfit(cid, 157, 1)
		 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received First Beggar Addon.")
		 doSendMagicEffect(getCreaturePosition(cid), 14)
		 doRemoveItem(item.uid, 1)
 		return 1
end

Add into data/actions/actions.xml:
PHP:
<action itemid="2145" script="smalldiamond.lua"/>

Reputation Plz ;>
 
The script: (data/actions/scripts/smalldiamond.lua)
PHP:
function onUse(cid, item, frompos, item2, topos)
		 doPlayerAddOutfit(cid, 153, 1)
		 doPlayerAddOutfit(cid, 157, 1)
		 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received First Beggar Addon.")
		 doSendMagicEffect(getCreaturePosition(cid), 14)
		 doRemoveItem(item.uid, 1)
 		return 1
end

Add into data/actions/actions.xml:
PHP:
<action itemid="2145" script="smalldiamond.lua"/>

Reputation Plz ;>

Thx Will Test It Rep+
 
But i if i want a new outfit
like a mob
doPlayerAddOutfit(cid, 255, 0)
its not work :S
 
@Elaney
nonono :/

all the addons? how i do then?

Code:
<outfit type="1" looktype="153" enabled="1" name="Beggar" premium="1" quest="STORAGE"/>
this is example, by adding quest="" value you can set those outfits available only for those who have certain storage. For example toy have set quest=12345 for knight outfit, so player with 12345,1 storage (setPlayerStorageValue(cid, 1234, 1)) will have this outfit enabled, and ofcourse player without 12345,1 storage won't have. Sry, messed up a bit but still readable xd
 
@Elaney
nonono :/



Code:
<outfit type="1" looktype="153" enabled="1" name="Beggar" premium="1" quest="STORAGE"/>
this is example, by adding quest="" value you can set those outfits available only for those who have certain storage. For example toy have set quest=12345 for knight outfit, so player with 12345,1 storage (setPlayerStorageValue(cid, 1234, 1)) will have this outfit enabled, and ofcourse player without 12345,1 storage won't have. Sry, messed up a bit but still readable xd

nono?
 
Yes nono
[02/03/2009 12:28:34] Lua Script Error: [Action Interface]
[02/03/2009 12:28:34] data/actions/scripts/br.lua:eek:nUse

[02/03/2009 12:28:34] attempt to index a number value
[02/03/2009 12:28:34] stack traceback:
[02/03/2009 12:28:34] [C]: in function 'doSetCreatureOutfit'
[02/03/2009 12:28:34] data/actions/scripts/br.lua:2: in function <data/actions/scripts/br.lua:1>
 
Aff, when you set creature outfit you get nothing just an illusion of changes.

If you wanna give player monster outfit for example from quest, then you should add this outfit to both males and females (only with changing id of sex). And use this storage quest thingy that I wrote up up up.
 
This works fine but how should i do if i want both beggar adddons? when i press on the item?

Example: You have received First and Second Beggar Addon
 
and remember:
20090209041339.png
 
Back
Top