Ecstacy
Mothafuckaaa
Hello,
I would like to request a NPC script which will do the following.
Ofcourse I'll +REP the one who comes with a working script.
I'm using Crying Damson 0.3.6pl1
#EDIT
I got this:
but he won't say anything when I greet him.
I would like to request a NPC script which will do the following.
Code:
--
It greets with:
"Welcome traveler, you may exchange your tokens here."
And farewells with:
"Farewell traveler!"
--
It exchanges a vampire token (itemid: 9020) for items,
i.e. for a horned helmet (itemid: 2496).
--
You must have storage [B]11551[/B] or else it will say:
"Sorry, I can not talk to you."
--
Also I would like it to be easy to configure so that I could add more items.
Ofcourse I'll +REP the one who comes with a working script.
I'm using Crying Damson 0.3.6pl1
#EDIT
I got this:
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
-- CONFIG --
newitem = "Here you go, glad to be doing bussiness with you!"
noitems = "You don't have enough tokens to pay for that."
-- Yalahari Mask --
function YalahariMask(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid, 11551) then
if getPlayerItemCount(cid, 9020) >= 10 then
if doPlayerRemoveItem(cid, 9020, 10) then
selfSay(newitem, cid)
doPlayerGiveItem(cid, 9778)
else
selfSay(noitems, cid)
end
else
selfSay(noitems, cid)
end
end
end
but he won't say anything when I greet him.
Last edited: