Script works when player have Waterpipe, lute, flute in backpack (Ofcourse) You can change this items, In my script when player have all items, and he use doors he get storage id 29071 (In my ots it's Brotherhood outfit) And next time when he use doors he can be teleport after doors, without items.
Add to Action
And if u want have any outfit like me in this quest just add in outfits.xml for example to Brotherhood outfit
change :
to
//Sorry for my English, it isn't perfect, but i'm trying.
Tested on TFS 0.3.5 Crying Damson works 100%
It's my first script than please for normal opinions
Create in actions/scripts file NAME.lua
Lua:
local storage = 29071
local teleportpos = {x=1000, y=1000, z=7, stackpos=1}
local waterpipe = 2099
local lute = 2072
local flute = 2070
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7878 then
if (getPlayerStorageValue(cid, storage) == -1) then
if (getPlayerItemCount(cid,waterpipe) >= 1) then
if (getPlayerItemCount(cid,lute) >= 1) then
if (getPlayerItemCount(cid,flute) >= 1) then
doPlayerRemoveItem(cid,2099,1)
doPlayerRemoveItem(cid,2072,1)
doPlayerRemoveItem(cid,2070,1)
setPlayerStorageValue(cid, storage, 1)
doPlayerSendTextMessage(cid, 21, "You've got new outfit, Congratulations.")
end
end
elseif (getPlayerStorageValue(cid, storage) == -1) then
doPlayerSendTextMessage(cid, 21, "You need Water Pipe, Lute and Flute to enter here.")
end
else
if (getPlayerStorageValue(cid, storage) == 1) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have this outfit, but you're welcome on music temple.")
doTeleportThing(cid, teleportpos)
end
end
end
return TRUE
end
Code:
<action uniqueid="7878" script="[COLOR="Red"]NAME[/COLOR].lua" />
change :
Code:
<outfit id="19" premium="yes" default="0">
<list gender="0" lookType="279" name="Brotherhood"/>
<list gender="1" lookType="278" name="Brotherhood"/>
</outfit>
Code:
<outfit id="19" premium="yes" default="0" quest="29071">
<list gender="0" lookType="279" name="Brotherhood"/>
<list gender="1" lookType="278" name="Brotherhood"/>
</outfit>
//Sorry for my English, it isn't perfect, but i'm trying.