Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 yea When atk the npc or click ctrl when next to it nothing happens. it worked with the default main.txt with godlords inventory stuff added. so yea here is the script thingy:' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script)Select Case ScriptCase 0Call PlayerMsg(index, "you look weak…go get me 10 flowers and I might not hurt ya!?", 12)If CanTake(Index, 1, 10) = false Then Call PlayerMsg(index, "You runt go kill those fur things for the flowers! I bet even you can beat em!", 12)Else Call TakeItem(index, 1, 10) Call GiveItem(index, 2, 1) Call GiveItem(index, 3, 1) Call GiveItem(index, 4, 1) Call GiveItem(index, 5, 1) Call PlayerMsg(index, "ok here is some armor and a port potion to the outer world!", 12)End IfExit SubCase 1Call PlayerMsg(index, "I need 15 roots. Um erm can you help me??", 12)If CanTake(Index, 7, 15) = false Then Call PlayerMsg(index, "go kill some elites they took them so they should them.!", 12)Else Call TakeItem(index, 7, 15) Call GiveItem(index, 8, 1) Call GiveItem(index, 9, 1) Call GiveItem(index, 10, 1) Call PlayerMsg(index, "ha those roots were never mine!", 12)End IfExit SubCase 2Call PlayerMsg(index, "hey get me 30 dragon wings…I will pay you well with real fighting gearâ€Â,12)If CanTake(Index, 15, 30) = false Then Call PlayerMsg(index, the dragon’s are south of here now get me the wings", 12)Else Call TakeItem(index, 15, 30) Call GiveItem(index, 12, 1) Call GiveItem(index, 13, 1) Call GiveItem(index, 14, 1) Call GiveItem(index 16,1 Call PlayerMsg(index, "well done enjoy!12)End IfExit SubCase 3Call PlayerMsg(index, "give me 60 gems for a great reward.", 12)If CanTake(Index, 17, 60) = false Then Call PlayerMsg(index, " the cave dwellers have the jewls from there mines", 12)Else Call TakeItem(index, 17, 60) Call GiveItem(index, 18, 1) Call GiveItem(index, 19, 1) Call GiveItem(index, 20, 1) Call GiveItem(index, 21, 1) Call PlayerMsg(index, "hmm these are fine!", 12)End IfExit SubCase 4Call PlayerMsg(index, "kill the boss for a epic armor set and the freedom from the arena", 12)If CanTake(Index, 22, 1) = false Then Call PlayerMsg(index, " the kinar have the jewls.", 12)Else Call TakeItem(index, 22, 1) Call GiveItem(index, 23, 1) Call GiveItem(index, 24, 1) Call GiveItem(index, 25, 1) Call GiveItem(index, 26, 1)Call GiveItem(index, 27, 1) Call PlayerMsg(index, "use the port potion to leave", 12)End IfExit SubEnd SelectEnd Subi checked npc has stats and scripts are on so yea… Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 25, 2009 Share Posted May 25, 2009 Line 41,Call PlayerMsg(index, "well done enjoy!12)Should beCall PlayerMsg(index, "well done enjoy!", 12) Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 thx i hope this works….!! Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 25, 2009 Share Posted May 25, 2009 Let me know if it doesn't, and I'll check for further errors. Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 no luck :( Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 25, 2009 Share Posted May 25, 2009 Okay, yea, you have quite afew more errors here with ending the strings (it looks like you used Microsoft word or something like that for some of these scripts).Line 32,Call PlayerMsg(index, "hey get me 30 dragon wings…I will pay you well with real fighting gearâ€Â,12)Should be:Call PlayerMsg(index, "hey get me 30 dragon wings…I will pay you well with real fighting gear",12)Line 34,Call PlayerMsg(index, the dragon’s are south of here now Get Me the wings", 12)Should be:Call PlayerMsg(index, "the dragon’s are south of here now Get Me the wings", 12)Line 40,Call GiveItem(index 16,1Should be:Call GiveItem(index 16,1)Also, you might have a logical error, if you set it so the item it needs to give/take, is stackable, so make sure it's not. Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 well still not working but i was using word so let me refix it with your noticing's and see if it works. i'm still new to this so this might be a lost cause. Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 hmm still no luck is there any other info i may provide for a soultion(btw thx for all the help so far I needed it even if the npc was working :) ) Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 25, 2009 Share Posted May 25, 2009 @Kainan54:> hmm still no luck is there any other info i may provide for a soultion(btw thx for all the help so far I needed it even if the npc was working :) )Please post your up-to-date version of the sub (this time though, please usetags this time though.Also, just making sure, you have scripting turned on (the Server's Control Panel Tab) Link to comment Share on other sites More sharing options...
Kainan54 Posted May 25, 2009 Author Share Posted May 25, 2009 ok``` 'Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 0Call PlayerMsg(index, "you look weak…go get me 10 flowers and I might not hurt ya!?", 12)If CanTake(Index, 1, 10) = false Then Call PlayerMsg(index, "You runt go kill those fur things for the flowers! I bet even you can beat em!", 12)Else Call TakeItem(index, 1, 10) Call GiveItem(index, 2, 1) Call GiveItem(index, 3, 1) Call GiveItem(index, 4, 1) Call GiveItem(index, 5, 1) Call PlayerMsg(index, "ok here is some armor and a port potion to the outer world!", 12)End IfExit SubCase 1Call PlayerMsg(index, "I need 15 roots. Um erm can you help me??", 12)If CanTake(Index, 7, 15) = false Then Call PlayerMsg(index, "go kill some elites they took them so they should them.!", 12)Else Call TakeItem(index, 7, 15) Call GiveItem(index, 8, 1) Call GiveItem(index, 9, 1) Call GiveItem(index, 10, 1) Call PlayerMsg(index, "ha those roots were never mine!", 12)End IfExit SubCase 2Call PlayerMsg(index, "hey get me 30 dragon wings…I will pay you well with real fighting gear",12)If CanTake(Index, 15, 30) = false Then Call PlayerMsg(index, "the dragon’s are south of here now Get Me the wings", 12)Else Call TakeItem(index, 15, 30) Call GiveItem(index, 12, 1) Call GiveItem(index, 13, 1) Call GiveItem(index, 14, 1) Call GiveItem(index 16,1) Call PlayerMsg(index, "well done enjoy!", 12)End IfExit SubCase 3Call PlayerMsg(index, "give me 60 gems for a great reward.", 12)If CanTake(Index, 17, 60) = false Then Call PlayerMsg(index, " the cave dwellers have the jewls from there mines", 12)Else Call TakeItem(index, 17, 60) Call GiveItem(index, 18, 1) Call GiveItem(index, 19, 1) Call GiveItem(index, 20, 1) Call GiveItem(index, 21, 1) Call PlayerMsg(index, "hmm these are fine!", 12)End IfExit SubCase 4Call PlayerMsg(index, "kill the boss for a epic armor set and the freedom from the arena", 12)If CanTake(Index, 22, 1) = false Then Call PlayerMsg(index, " the kinar have the jewls.", 12)Else Call TakeItem(index, 22, 1) Call GiveItem(index, 23, 1) Call GiveItem(index, 24, 1) Call GiveItem(index, 25, 1) Call GiveItem(index, 26, 1)Call GiveItem(index, 27, 1) Call PlayerMsg(index, "use the port potion to leave", 12)End IfExit Sub End SelectEnd Sub```and scripts are on in sever Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 25, 2009 Share Posted May 25, 2009 Just making sure, Flowers, Roots, gems , etc, they are not stackable, right? As I said, they can't be stackable, and people don't have 60 item slots, can they?This may be causing a logical error Link to comment Share on other sites More sharing options...
Kainan54 Posted May 26, 2009 Author Share Posted May 26, 2009 well yea they were stackable(btw do i need to make give currency or somthing for stack?) but the problem still persisted when i un stacked them so im very confused…i noticed i deleted this case else thing when i put scripts in..do i need the case else? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted May 26, 2009 Share Posted May 26, 2009 You don't need to have Case Else (I don't think), but it's very good to have it.For giving stackable items, you need to use Givecurrency, and I don't think you can take stackable items at all. Link to comment Share on other sites More sharing options...
Bobosk Posted May 26, 2009 Share Posted May 26, 2009 It depends which TakeItem you're using, since there's a few of them floating around… 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