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

Solved Aol not drops and Npc Bone Master

Status
Not open for further replies.

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
when it dies aol is not dropping

<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventDrop" value="1"/>
<attribute key="charges" value="1"/>
</item>

my server is The Forgotten Server, version 0.3.5 (Crying Damson)

And may pass the NPC and other bone master trading 500 essence for nightmare shield or necromancer shield

sought but not found

Thanks !!
 
Last edited:
when it dies aol is not dropping

<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventDrop" value="1"/>
<attribute key="charges" value="1"/>
</item>

my server is The Forgotten Server, version 0.3.5 (Crying Damson)

And may pass the NPC and other bone master trading 500 essence for nightmare shield or necromancer shield

sought but not found

Thanks !!

Items.xml
PHP:
	<item id="2173" article="an" name="amulet of loss">
		<attribute key="weight" value="420"/>
		<attribute key="slotType" value="necklace"/>
		<attribute key="charges" value="1"/>
		<attribute key="preventDrop" value="1"/>
	</item>

and in movements.xml

PHP:
	<movement type="Equip" itemid="2173" slot="necklace" event="function" value="onEquipItem"/>
	<movement type="DeEquip" itemid="2173" slot="necklace" event="function" value="onDeEquipItem"/>
 
Items.xml
PHP:
	<item id="2173" article="an" name="amulet of loss">
		<attribute key="weight" value="420"/>
		<attribute key="slotType" value="necklace"/>
		<attribute key="charges" value="1"/>
		<attribute key="preventDrop" value="1"/>
	</item>

and in movements.xml

PHP:
	<movement type="Equip" itemid="2173" slot="necklace" event="function" value="onEquipItem"/>
	<movement type="DeEquip" itemid="2173" slot="necklace" event="function" value="onDeEquipItem"/>


already have this in movements ^^
 
change it in items.xml
<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventDrop" value="1"/>
<attribute key="charges" value="1"/>
</item>
for it:
<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventDrop" value="1"/>
<attribute key="charges" value="0"/>
</item>

Here it work. Hope it help you :)
 
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

	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

	if(msgcontains(msg, "essence") or msgcontains(msg, "shield")) then
		selfSay("Do you want to trade 500 demonic essences for a necromancer shield?", cid)
		talkState[talkUser] = 1
	elseif(talkState[talkUser] == 1) then
		if(msgcontains(msg, "yes") then
			if(getPlayerItemCount(cid, 6500) >= 500) then
				doPlayerRemoveItem(cid, 6500, 500)
				doPlayerAddItem(cid, 6433, 1)
				selfSay("Here you are.", cid)
			else
				selfSay("Sorry, you don't have enough enough.", cid)
			end
		else
			selfSay("Perhaps next time.", cid)
		end
		talkState[talkUser] = 0
	end
	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
xitos (PM) said:
Hi


you have the npc nightmare shield too?
I forgot to put it in the topic
thank you very much !! :peace:
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

        local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

        if(msgcontains(msg, "essence") or msgcontains(msg, "shield")) then
                selfSay("Do you want to trade 500 demonic essences for a nightmare shield?", cid)
                talkState[talkUser] = 1
        elseif(talkState[talkUser] == 1) then
                if(msgcontains(msg, "yes") then
                        if(getPlayerItemCount(cid, 6500) >= 500) then
                                doPlayerRemoveItem(cid, 6500, 500)
                                doPlayerAddItem(cid, 6391, 1)
                                selfSay("Here you are.", cid)
                        else
                                selfSay("Sorry, you don't have enough enough.", cid)
                        end
                else
                        selfSay("Perhaps next time.", cid)
                end
                talkState[talkUser] = 0
        end
        return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
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

        local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

        if(msgcontains(msg, "essence") or msgcontains(msg, "shield")) then
                selfSay("Do you want to trade 500 demonic essences for a nightmare shield?", cid)
                talkState[talkUser] = 1
        elseif(talkState[talkUser] == 1) then
                if(msgcontains(msg, "yes") then
                        if(getPlayerItemCount(cid, 6500) >= 500) then
                                doPlayerRemoveItem(cid, 6500, 500)
                                doPlayerAddItem(cid, 6391, 1)
                                selfSay("Here you are.", cid)
                        else
                                selfSay("Sorry, you don't have enough enough.", cid)
                        end
                else
                        selfSay("Perhaps next time.", cid)
                end
                talkState[talkUser] = 0
        end
        return true
end

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


thank you very much :):)

you are my hero :peace:
 
Status
Not open for further replies.
Back
Top