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

[Request] click statue and get addons

Xaiman

New Member
Joined
Feb 27, 2010
Messages
94
Reaction score
0
i want to be able to have a statue that when you click it, it gives you the warmaster addons. if anyone can give/make me the script it would be appreciated.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (getPlayerStorageValue(cid, 15031) == -1) then
	doPlayerSendTextMessage(cid,21,"You now have the Warmaster Addons!")
	doPlayerAddOutfit(cid, 335, 1)
	doPlayerAddOutfit(cid, 336, 2)
	setPlayerStorageValue(cid, 15031, 1)
	doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
else
	doPlayerSendTextMessage(cid,25,"You already have the Warmaster Addons.")
end
return TRUE
end

Just add it with a uniqueid to the Actions.xml
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doPlayerAddAddons(cid, 3) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have gained all addons.")
end
 
addon.lua data/actions/scripts/*
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getPlayerStorageValue(cid, 4767) == EMPTY_STORAGE) then
		doCreatureSay(cid, "You have gained your new outfit and may leave the reward room now!", TALKTYPE_ORANGE_1)
		doPlayerAddOutfit(cid, 336, 3)
		doPlayerAddOutfit(cid, 335, 3)
		setPlayerStorageValue(cid, 4767, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
	else
		doPlayerSendTextMessage(cid,22,"You have already gained your new outfit. You may leave the room now.")
	end
	return true
end

action.xml data/actions/*
Code:
    <action uniqueid="4767" event="script" value="addon.lua"/>


Put 4767 as unique ID in the statue on the map.

Script comes from the zao map release, credits to frankfarmer and barker.
 
Thanks for replying so fast.. How can I find out the diffrent addon numbers? like addon to citizen, hunter, mage etc..
 
Back
Top