tymax1234yahoo.com Posted April 25, 2009 Author Share Posted April 25, 2009 k, my first question is when you make the"FLAGS.ini" where do you place it? secondly, I'm getting an error; after a lot of looking I found a script that almost worked([http://www.touchofdeathforums.com/smf/index.php/topic,29991.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,29991.0.html)) but the problem is it only says the first message in the script. now this probably has something to do with the first question, but I'm a bit of a newbie to this…[EDIT]It turns out the answer was to use a very popular script that I thought would be hard to edit, but actually it makes an easily editable file for each different quest. XD-USE THIS SCRIPT IF YOUR A NEWBIE!!-[http://www.touchofdeathforums.com/smf/index.php?topic=5309.0](http://www.touchofdeathforums.com/smf/index.php?topic=5309.0) ;) Link to comment Share on other sites More sharing options...
tymax1234yahoo.com Posted April 25, 2009 Author Share Posted April 25, 2009 please guys, I need an answer; and I will not"bump", I'm not that big of a newb Link to comment Share on other sites More sharing options...
Fruitpunch Posted April 25, 2009 Share Posted April 25, 2009 may I see the script so that I may examine it? Link to comment Share on other sites More sharing options...
tymax1234yahoo.com Posted April 25, 2009 Author Share Posted April 25, 2009 heres the code, but i'm pretty shure I have "flags.ini" in the wrong place```Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 0Call PlayerMsg(index, "can u get me a ham?", 12)If CanTake(Index, 2, 1) = false Then Call PlayerMsg(index, "You didn't get the ham, comon, GET IT!", 12)Else Call TakeItem(index, 2, 1) Call GiveItem(index, 3, 100) Call PlayerMsg(index, "Thanks heres your Reward!", 12)End IfExit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Bobosk Posted April 25, 2009 Share Posted April 25, 2009 ok, first…. The item needs to be stackable(Ham), and if you're trying to give a stackable item, you need to do..```Call GiveCurrency(index, 3, 100)```instead of```Call GiveItem(index, 3, 100)```…This script doesn't even call on flags.ini, so it doesn't matter... Link to comment Share on other sites More sharing options...
tymax1234yahoo.com Posted April 26, 2009 Author Share Posted April 26, 2009 OK, well I did what you said I changed what I had to to make the script"work", but I still have the same problem. And the sad thing is, I have 5 of the item the npc needs only one of. In other words, I have the item and he does only the first message, not giving the player any reward. :huh:Oh and here is the"corrected" code-```' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 0Call PlayerMsg(index, "I'm the shop tutor, can u buy me a ham from the store?", 12)If CanTake(Index, 2, 1) = false Then Call PlayerMsg(index, "You didn't get the item! Go buy it from the merchant!", 12)Else Call TakeItem(index, 2, 1) Call GiveItem(index, 3, 1) Call PlayerMsg(index, "Thanks heres your Reward!", 12)End IfExit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
Bobosk Posted April 26, 2009 Share Posted April 26, 2009 ```' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 0Call PlayerMsg(index, "I'm the shop tutor, can u buy me a ham from the store?", 12)If CanTake(Index, 2, 1) = false Then Call PlayerMsg(index, "You didn't get the item! Go buy it from the merchant!", 12)Else Call TakeItem(index, 2, 1) Call GiveCurrency(index, 3, 1) Call PlayerMsg(index, "Thanks heres your Reward!", 12)End IfExit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```GiveCurrency and GiveItem are two completely different things, one gives armor/weapons etc. because it uses (Index, Number, Durability) and the other gives stackable items, because it uses (Index, Number, Amount).Also, the functions;```CanTake(Index, Number, Amount)TakeItem(Index, Number, Amount)GiveItem(Index, Number, Durability)GiveCurrency(Index, Number, Amount)```are not hardcoded into Eclipse, you need to have those functions from their source, added to your Main.txt manually.. Link to comment Share on other sites More sharing options...
tymax1234yahoo.com Posted April 26, 2009 Author Share Posted April 26, 2009 @Bobosk:> ```> CanTake(Index, Number, Amount)> TakeItem(Index, Number, Amount)> GiveItem(Index, Number, Durability)> GiveCurrency(Index, Number, Amount)> ```are not hardcoded into Eclipse, you need to have those functions from their source, added to your Main.txt manually..How, is there a tutorial that shows you how to do this? I would just search it, but as many know the search engine for the forum doesn't work.thanks for all your help Link to comment Share on other sites More sharing options...
YuraguKoto Posted April 30, 2009 Share Posted April 30, 2009 It's Godlord's Inventory Script. Try the script index sticky at the Script Database forum. I use his script personally, I think it's a great creation =D 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