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

NPC - Outfits

Hrsha

Member
Joined
May 30, 2010
Messages
450
Reaction score
21
Location
Egypt
how to insert this line ?
Code:
if getPlayerVipDays(cid) >= 1 then

How to make this npc sell second promotion if vip days > 0

Code:
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

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
--[[
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--

npcHandler:addModule(FocusModule:new())


2- outfits how to make first promotion get x outfit
and how to set outfit as quest ?

rep ++
 
and how to set outfit as quest ?

in outfits.xml add this to some outfit:
quest="storage_done_of_the_quest"

or just add this to the quest script when player are getting their rewards... so if they r getting items, there is:
doPlayerAddItem(cid, item_id, item_count)

so under that line, add this line:
doPlayerAddOutfit(cid, looktype, addon)

looktype = outfit id
addon = if the outfit should be with addon... 0 = no addons, 1 = 1st addon, 2 = 2nd addon, 3 = all addons


is that what you wanted?
 
in outfits.xml add this to some outfit:
quest="storage_done_of_the_quest"

or just add this to the quest script when player are getting their rewards... so if they r getting items, there is:
doPlayerAddItem(cid, item_id, item_count)

so under that line, add this line:
doPlayerAddOutfit(cid, looktype, addon)

looktype = outfit id
addon = if the outfit should be with addon... 0 = no addons, 1 = 1st addon, 2 = 2nd addon, 3 = all addons


is that what you wanted?

ye thanks ... rep + done

what if i will add outfit on quest script by storag ?
 
Back
Top