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

A full adoon for each nugget

all addons for 1 nugget!

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

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 creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if msgcontains(msg, 'addons') and doPlayerRemoveItem(cid, 2157, 1) == TRUE then
        npcHandler:say('There you are!', cid)
        doPlayerAddAddons(cid, 1)
	doPlayerAddAddons(cid, 2)
    else 
        npcHandler:say('come back when You have them!', cid)
    end
   return TRUE
end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

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

Each addon for 1 nugget!
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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 creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
    
    if msgcontains(msg, 'addons') and doPlayerRemoveItem(cid, 2157, 1) == TRUE then
        npcHandler:say('There you are!', cid)
        doPlayerAddOutfit(cid, 128, 1)
        doPlayerAddOutfit(cid, 136, 1)
        doPlayerAddOutfit(cid, 128, 2)
        doPlayerAddOutfit(cid, 136, 2)
    else 
        npcHandler:say('come back when You have them!', cid)
    end
   return TRUE
end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

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

just change:
Lua:
        doPlayerAddOutfit(cid, 128, 1)
        doPlayerAddOutfit(cid, 136, 1)
        doPlayerAddOutfit(cid, 128, 2)
        doPlayerAddOutfit(cid, 136, 2)
 
Last edited:
Back
Top