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

[Help] Buy a decent outfit

furstwin

New Member
Joined
Aug 9, 2007
Messages
486
Reaction score
1
Location
Sweden
Heya everyone on OtLand :]

I am going to make my own server with a custom map etc and I got a island looking like svargrond, these new 8.0 houses etc.. And I wounder how to make a npc sell you the outfit, Not the addons, The outfit :p

E.g
Me: Hi
Npc: Hello Furstwin!
Me: Norseman outfit
Npc: Do you want to buy the norseman outfit for 30000 gold?
Me: Yes
Npc: Here you are.

Thanks in advance

Sincerly,
Furstwin.
 
I mean.. Like.. If a player make a character, levling it up etc..
And then he's going to the Snow town.. To a npc and want norseman outfit, since he dont start with pirate, beggar, pirate, shaman.. So he want norseman..

How should I do in outfits.xml and the npc's .lua file?

Sincerly,
Furstwin
 
Last edited:
I mean.. Like.. If a player make a character, levling it up etc..
And then he's going to the Snow town.. To a npc and want norseman outfit, since he dont start with pirate, beggar, pirate, shaman.. So he want norseman..

How should I do in outfits.xml and the npc's .lua file?

Sincerly,
Furstwin

U mean an npc that sells the compleet norseman outfit for 10k right?

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
	-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	if(npcHandler.focus ~= cid) then
		return false
	end

		outfit_need_premium = 'Sorry, you need a premium account to get outfits.'
		outfit_have_already = 'Sorry, you already have this addon.'
		outfit_give = 'Here you are.'	
		
		if msgcontains(msg, 'norseman outfit') then
			if isPremium(cid) then
					selfSay('Would u like to buy norseman outfit for 10k?')
					talk_state = 1
			else
				selfSay(outfit_need_premium)
				talk_state = 0
			end
------------------------------------------------ confirm yes ------------------------------------------------
		elseif msgcontains(msg, 'yes') and talk_state == 1 then
			talk_state = 0
			if getPlayerItemCount(cid,7290) >= 5 then
				outfit = getPlayerStorageValue(cid,150003)
				if outfit == -1 then
					if doPlayerTakeMoney(cid,10000) then
						selfSay(addon_give)
						doPlayerAddOutfit(cid, 251, 1)
						doPlayerAddOutfit(cid, 252, 1)
						doPlayerAddOutfit(cid, 251, 2)
						doPlayerAddOutfit(cid, 252, 2)
						setPlayerStorageValue(cid,150003,1)
					end
				else
					selfSay(outfit_have_already)
				end
			else
				selfSay(outfit_have_not_items)
			end 
			
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 34) then
			selfSay('Ok than.')
			talk_state = 0
		end
	-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())




i know take money is bugged i saw it already
 
Is this the addons or the outfit?
The point with this is I am making a rpg server wich hopefully starts next week, and I dont want ppls to START with the OUTFIT..

Like real tibia, you dont start with the outfit, you have to make a quest to get it.. And as soon I know how to do with outfits.xml and the npc's .lua file I can start my server.

Hope you guys got it, Buy outfit, not addon :p

Sincerly,
Furstwin.
 
Back
Top