shador2020 Posted May 22, 2009 Author Share Posted May 22, 2009 Well guys if i write in version EE 2.71….Call TakeItem(index,10,0)he wont takeoff the item of my inventory or like this here' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script)Select Case ScriptCase 0 If QuestItem(index, 10) Then Call TakeItem(index, 10, 0) Call GiveItem(index, 5, 0) Call PlayerMsg(index, "Congrats quest complete.", 4) end IfExit SubCase ElseCall PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)Exit SubEnd SelectEnd Subhere the functionSub QuestItem(index, item)SLOT = 1QuestItem = falseDo While SLOT < 24If GetPlayerInvItemNum(index, SLOT) = item ThenQuestItem= trueSLOT = 24End IfSLOT = SLOT+1LoopEnd Subboth of this are from GodLord so credits to him :obut now if choose on my npc script 0(for case 0)he wont do anything if i try to complete quest with my Quest item in the inventar...(anyway can i write Functions or anything else on my own? sub QuestItem(index,item)?)thx for help Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 22, 2009 Share Posted May 22, 2009 Why not just use Godlord's CanTake function?Also, you're calling TakeItem wrong, it should be: Call TakeItem(index, 10, 1)But yea, why not just do: If CanTake(Index, 10, 1) Then Call TakeItem(index, 10, 1) Call GiveItem(Index, 10, 0) Call PlayerMsg(index, "Congrats quest complete.", 4) End If Exit SubAlso, the item you're taking/giving, can't be stackable Link to comment Share on other sites More sharing options...
shador2020 Posted May 22, 2009 Author Share Posted May 22, 2009 ok i followed the whole tutorial of GodLord new problem is i cant speak to the npc so that i can deliver the item that i got…..and anyway what type should be the item? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 22, 2009 Share Posted May 22, 2009 What do you mean you can't speak to the NPC?Afew quick checks, make sure Scripting is turned on (Server's Control Panel), and make sure your NPC has atleast 1 of every stat Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Share Posted May 25, 2009 shador does it work now cause i think i might be having same prob Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now