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

Need script: Aol seller Script i gvie u rep+++ if u help me !!!

Code:
local CONST_ASSASSIN_STAR_COST = 45
local CONST_ASSASSIN_STAR_LEVEL = 80
local CONST_ASSASSIN_STAR_ITEMID = 7368

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 count = 1

function assassinStarCallback(cid, message, keywords, parameters)
    if(cid ~= npcHandler.focus) then
        return false
    end
    if(not(getPlayerStorageValue(cid,120001) == 1 and getPlayerStorageValue(cid,120002) == 1)) then
        npcHandler:say('I only sell assassin stars to more experienced people.')
        keywordHandler:reset()
    elseif(getPlayerLevel(cid) < CONST_ASSASSIN_STAR_LEVEL) then
        npcHandler:say('Your level is too low.')
        keywordHandler:reset()
    else
        count = ShopModule:getCount(message)
        npcHandler:say('I see that you are experienced enough. Do you want to buy ' .. count .. ' for ' .. count*CONST_ASSASSIN_STAR_COST .. ' gold coins?')
    end
    return true
end

function buyAssassinStarCallback(cid, message, keywords, parameters)
    if(cid ~= npcHandler.focus) then
        return false
    end
    
    if(doPlayerBuyItem(cid, CONST_ASSASSIN_STAR_ITEMID, count, count*CONST_ASSASSIN_STAR_COST) == LUA_NO_ERROR) then
        npcHandler:say('Here you are.')
    else
        npcHandler:say('You cannot afford that.')
    end
    keywordHandler:reset()
    return true
end

local node = keywordHandler:addKeyword({'assassin'}, assassinStarCallback)
node:addChildKeyword({'yes'}, buyAssassinStarCallback)
node:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Then what do you want?', reset = true})

local keywordModule = KeywordModule:new()
npcHandler:addModule(keywordModule)

keywordModule:addKeyword({'aol'}, 'I sell AOL for 2k.')

npcHandler:addModule(FocusModule:new())
 
Ever used the search function?

Just search npcs.. Or you can just go to the RIGHT section for this and request it. (If you dont find)
 
In your NPC Folder (Amuletseller.xml)

Code:
<npc name="Amuletseller" script="data/npc/scripts/amulet.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="134" head="114" body="113" legs="113" feet="113" addons="3" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell amulet of loss,dwarven ring,might ring,key ring,time ring,energy ring,stealth ring,life ring, ring of healing, club ring ,sword ring and axe ring." />
		<parameter key="shop_buyable" value="vial,2006,10;flask,2006,10" />
		<parameter key="shop_buyable" value="amulet of loss,2173,50000;dwarven ring,2213,2000;might ring,2164,5000,20;key ring,5801,10000;time ring,2169,2000;energy ring,2167,2000;stealth ring,2165,2000;life ring,2168,1000,5;ring of healing,2214,2000;axe ring,2208,200;club ring,2209,200;sword ring,2207,200;stone skin,2197,5000,5" />
	</parameters>
</npc>

Create a new lua file as "amulet.lua" in your NPC/Scripts and paste this code:

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

npcHandler:addModule(FocusModule:new())

This npc will also sell you rings.
 
Back
Top