PHP:
- <npc name="Jacks Friend" floorchange="0" walkinterval="2000">
<health now="1" max="1" />
<look type="131" head="114" body="114" legs="95" feet="58" addons="2" />
- <interaction range="3" idletime="30">
local pos = 0 setPlayerStorageValue(cid, 2379, 1)
- <interact keywords="hi" focus="1">
<keywords>hello</keywords>
<keywords>greet</keywords>
- <response>
- <action name="script">
- <![CDATA[
if(getPlayerStorageValue(cid, 2379)) == 2 then
selfSay("You have already given me the knife!")
elseif(getPlayerItemCount(cid,2379)) == 1 then
selfSay("You have escaped! And you have my friends knife! Thank you so much for bringing it to me.")
doPlayerTakeItem(cid,2379,1)
doPlayerAddExp(cid,4200)
setPlayerStorageValue(cid, 2379, 2)
else
selfSay("Wheres my friends knife?")
_state.isidle = true
pos = {x=26, y=56, z=10}
doTeleportThing(cid, pos)
doSendMagicEffect(newPos, 10)
end
]]>
</action>
</response>
</interact>
- <interact keywords="bye" focus="0">
<keywords>farewell</keywords>
<response text="Good bye. Safe journey to you." />
</interact>
- <interact event="onBusy">
- <response text="Please give me a moment!">
<action name="addqueue" value="|PLAYER|" />
</response>
</interact>
- <interact event="onPlayerLeave" focus="0">
<response text="Thanks for your help!" />
</interact>
</interaction>
</npc>
Really easy to change as its short and consise. It checks to make sure you havnt done the quest, checks for the item, then if you dont have the item teleports you back to a zone where u can find the item. (or in the case of our server, back to the start of the zone to pick it up where they might have dropped it) he gives experience on quest completion, I spent 8 hours searching for a tutorial on how to do this, well here it is. Quest NPC that gives exp.