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

{Request} NPC Hoaxette

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
I tried to make NPC Hoaxette but It's to hard to make the script of jester parts, can some1 give me a fully working NPC Hoaxette and script? xD
 
I can make you a npc That looks lika jester with full addons aswell and call it Hoaxette i dont know who this npc is so i dont know her script but ure problemw as u dont know how to make a jester right?
 
I made this:
Hoaxette.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Hoaxette" script="hoaxette.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="270" head="78" body="81" legs="53" feet="79" addons="1"/>
	<voices>
		<voice text="It is the prank month! Yeeehaw!" interval2="30000" margin="1" yell="yes"/>
		<voice text="Got all six parts of a jester doll? Bring them to me!" interval2="120000" margin="1" yell="no"/>
		<voice text="Surprise your friends with my... funny stuff. Ehehe." interval2="150000" margin="1" yell="no"/>
	</voices>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="shop_sellable" value="baby rotworm,10942,1500"/>
	<parameter key="shop_buyable" value="spellwand,7735,299;yellow pillow,8072,299;explosive present,8110,199"/>
    </parameters>
</npc>
Hoaxette.lua
PHP:
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 item = 'I\'m sorry, but you do not have the parts of jester doll for trade! <giggles>.'
local done = 'Goodie! Here you are! <giggles>.'

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	if msgcontains(msg, 'jester doll') then 
        if getPlayerItemCount(cid,9694) >= 1 and getPlayerItemCount(cid,9695) >= 1 and getPlayerItemCount(cid,9696) >= 1 and getPlayerItemCount(cid,9697) >= 1 and getPlayerItemCount(cid,9698) >= 1 then 
            selfSay('Oh! <giggles> Have you found all six parts of a jester doll and would like to assemble them?', cid) 
            talk_state = 1 
        else 
            selfSay('I\'m sorry, but you do not have the parts of jester doll for trade! <giggles>.', cid) 
            talk_state = 0 
        end 
    elseif msgcontains(msg, 'yes') and talk_state == 1 then 
        talk_state = 0 
        if getPlayerItemCount(cid,9694) >= 1 and getPlayerItemCount(cid,9695) >= 1 and getPlayerItemCount(cid,9696) >= 1 and getPlayerItemCount(cid,9697) >= 1 and getPlayerItemCount(cid,9698) >= 1 then 
            for i = 1, 4 do 
                doPlayerRemoveItem(cid, 9694, i) 
                doPlayerRemoveItem(cid, 9695, i) 
                doPlayerRemoveItem(cid, 9696, i) 
                doPlayerRemoveItem(cid, 9697, i) 
                doPlayerRemoveItem(cid, 9698, i) 
            end 
            doPlayerAddItem(cid,9693,1) 
            selfSay(done, cid) 
        else 
            selfSay(item, cid) 
        end 
	elseif msgcontains(msg, 'no') and talk_state >= 1 then
		selfSay('Well, then leave.')
		talk_state = 0
	end
	
	return true
end

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

its free :3
 
Back
Top Bottom