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

Is it possible?

Himad

Eight Wonder Of The World
Joined
Oct 30, 2008
Messages
200
Reaction score
0
Location
United arab emarits/Dubai
Is it possible to make a npc who can sell outfit
and other who can sell full addon..

I could Pay 5 dollars via paypal to the one who gonna help me.
or..
he could be kind and give it for free :p


Thanks in advance
/himad
 
1# npc which sell human outfit
2#not full addon like one to sell full assassin and other to sell full barbarian etc.. and that they sell it for money not for items like rl tibia
 
First off, edit your outfits.xml to this one, so that players don't have "quest" addons by default. :
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<outfits>
	<!-- Female outfits -->
	<outfit type="0" looktype="136" enabled="1" name="Citizen" premium="0"/>
	<outfit type="0" looktype="137" enabled="1" name="Hunter" premium="0"/>
	<outfit type="0" looktype="138" enabled="1" name="Mage" premium="0"/>
	<outfit type="0" looktype="139" enabled="1" name="Knight" premium="0"/>
	<outfit type="0" looktype="140" enabled="1" name="Noblewoman" premium="1"/>
	<outfit type="0" looktype="141" enabled="1" name="Summoner" premium="1"/>
	<outfit type="0" looktype="142" enabled="1" name="Warrior" premium="1"/>
	<outfit type="0" looktype="147" enabled="1" name="Barbarian" premium="1"/>
	<outfit type="0" looktype="148" enabled="1" name="Druid" premium="1"/>
	<outfit type="0" looktype="149" enabled="1" name="Wizard" premium="1"/>
	<outfit type="0" looktype="150" enabled="1" name="Oriental" premium="1"/>
	<outfit type="0" looktype="155" enabled="1" name="Pirate" premium="1" quest="35155"/>
	<outfit type="0" looktype="156" enabled="1" name="Assassin" premium="1" quest="35156"/>
	<outfit type="0" looktype="157" enabled="1" name="Beggar" premium="1" quest="35157"/>
	<outfit type="0" looktype="158" enabled="1" name="Shaman" premium="1" quest="35158"/>
	<outfit type="0" looktype="252" enabled="1" name="Norsewoman" premium="1" quest="35252"/>
	<outfit type="0" looktype="269" enabled="1" name="Nightmare" premium="1" quest="35269"/>
	<outfit type="0" looktype="270" enabled="1" name="Jester" premium="1" quest="35270"/>
	<outfit type="0" looktype="279" enabled="1" name="Brotherhood" premium="1" quest="35279"/>
	<outfit type="0" looktype="288"	enabled="1" name="Demonhunter" premium="1" quest="35288"/>
	<outfit type="0" looktype="324" enabled="1" name="Yalaharian" premium="1" quest="35324"/>

	<!-- Male outfits -->
	<outfit type="1" looktype="128" enabled="1" name="Citizen" premium="0"/>
	<outfit type="1" looktype="129" enabled="1" name="Hunter" premium="0"/>
	<outfit type="1" looktype="130" enabled="1" name="Mage" premium="0"/>
	<outfit type="1" looktype="131" enabled="1" name="Knight" premium="0"/>
	<outfit type="1" looktype="132" enabled="1" name="Nobleman" premium="1"/>
	<outfit type="1" looktype="133" enabled="1" name="Summoner" premium="1"/>
	<outfit type="1" looktype="134" enabled="1" name="Warrior" premium="1"/>
	<outfit type="1" looktype="143" enabled="1" name="Barbarian" premium="1"/>
	<outfit type="1" looktype="144" enabled="1" name="Druid" premium="1"/>
	<outfit type="1" looktype="145" enabled="1" name="Wizard" premium="1"/>
	<outfit type="1" looktype="146" enabled="1" name="Oriental" premium="1"/>
	<outfit type="1" looktype="151" enabled="1" name="Pirate" premium="1" quest="35151"/>
	<outfit type="1" looktype="152" enabled="1" name="Assassin" premium="1" quest="35152"/>
	<outfit type="1" looktype="153" enabled="1" name="Beggar" premium="1" quest="35153"/>
	<outfit type="1" looktype="154" enabled="1" name="Shaman" premium="1" quest="35154"/>
	<outfit type="1" looktype="251" enabled="1" name="Norseman" premium="1" quest="35251"/>
	<outfit type="1" looktype="268" enabled="1" name="Nightmare" premium="1" quest="35268"/>
	<outfit type="1" looktype="273" enabled="1" name="Jester" premium="1" quest="3573"/>
	<outfit type="1" looktype="278" enabled="1" name="Brotherhood" premium="1" quest="35278"/>
	<outfit type="1" looktype="289"	enabled="1" name="Demonhunter" premium="1" quest="35289"/>
	<outfit type="1" looktype="325" enabled="1" name="Yalaharian" premium="1" quest="35325"/>

	<!-- Custom outfits -->
	<outfit type="2" looktype="12" enabled="1" name="Archdemon" premium="1" quest="30015"/>
	<outfit type="2" looktype="159" enabled="1" name="Elf" premium="1"/>
	<outfit type="2" looktype="160" enabled="1" name="Dwarf" premium="1"/>
	<outfit type="2" looktype="226" enabled="1" name="Frog" premium="1"/>
	<outfit type="2" looktype="194" enabled="1" name="Cult" premium="1"/>
	<outfit type="2" looktype="253" enabled="1" name="Headsplitter" premium="1"/>
	<outfit type="2" looktype="254" enabled="1" name="Skullhunter" premium="1"/>
	<outfit type="2" looktype="255" enabled="1" name="Bloodwalker" premium="1"/>
	<outfit type="2" looktype="264" enabled="1" name="Brutetamer" premium="1"/>

	<!-- Group outfits -->
	<outfit type="0;1;2" looktype="75" enabled="1" name="GM Outfit" access="3"/>
	<outfit type="0;1;2" looktype="266" enabled="1" name="CM Outfit" access="4"/>
	<outfit type="0;1;2" looktype="302" enabled="1" name="God" access="5"/>
</outfits>

After that, you need a NPC which'll sell outfits for money.
The point is; he needs to set a storage value upon taking player's money successfuly. The outfit storage values are "35000 + outfit's looktype".

I think I don't have enough time to make the complete NPC script.
 
Try this NPC Lua script.. it only supports assassin outfit so far. Note that I haven't tested it yet, so post any errors you find.

Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)	npcHandler:onCreatureSay(cid, type, msg)	end
function onThink()						npcHandler:onThink()						end

function buyAssassinOutfit(cid, message, keywords, parameters, node)
	if(not npcHandler:isFocused(cid)) then
		return false
	end

	
	local cost = parameters.cost
	local premium = (parameters.premium ~= nil and parameters.premium)
	
if getPlayerStorageValue(cid, 35000 + parameters.looktypeFemale) == -1 and getPlayerStorageValue(cid, 35000 + parameters.looktypeFemale) == -1 then
	if isPlayerPremiumCallback == nil or (isPlayerPremiumCallback(cid) and premium) then
		if doPlayerRemoveMoney(cid, cost) == TRUE then
			if getPlayerSex(cid) == 0 then
				setPlayerStorageValue(cid, 35000 + parameters.looktypeFemale, 1)
			else
				setPlayerStorageValue(cid, 35000 + parameters.looktypeMale, 1)
			end
			npcHandler:say('There you go, you may use the assassin outfit now!', cid)
		else
			npcHandler:say('Sorry, you do not have enough money.', cid)
		end
	else
		npcHandler:say('I only serve customers with premium accounts.', cid)
	end
else
npcHandler:say('You already have the assassin outfit.', cid)
end

	keywordHandler:moveUp(1)
	return true
end

local node1 = keywordHandler:addKeyword({'assassin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the assassin outfit for 10000 gold coins?'})
	node1:addChildKeyword({'yes'}, buyAssassinOutfit, {looktypeFemale = 156, looktypeMale = 152, cost = 10000, premium = true})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'})

keywordHandler:addKeyword({'outfit'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can sell you the assassin outfit.'})

npcHandler:addModule(FocusModule:new())

In case it works, I can make it for every outfit.
 
Sorry, but tag 'quest="storagevalue"' works only on TFS 0.3
That means you'll have to upgrade to TFS 0.3, OR compile 0.2 with support for Outfit Quests.
 
Back
Top