Orechalcos Posted August 11, 2008 Author Share Posted August 11, 2008 Hi, I'm stupid and need to know…Where do I put scripts for NPCs, Items, etc.? Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Share Posted August 11, 2008 Main.txt Link to comment Share on other sites More sharing options...
munro Posted August 11, 2008 Share Posted August 11, 2008 scripted npcscripted itemscripted..etcall in main.txt Link to comment Share on other sites More sharing options...
Orechalcos Posted August 11, 2008 Author Share Posted August 11, 2008 thanksEDIT```Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Dim Exp Dim x Dim y Dim z Dim a Exp = GetplayerExp(index) x = 10 y = 20 z = 30 a = 5 If GetPlayerLevel(Index) <=5 Call PlayerMsg(index, "Hi! I'm Trainer Lar, and I'm here to teach melee combat! It's quite simple! Go out and use the CTRL key to attack some rabbits! Bring me back five rabbit feet.", 12) If CanTake(Index, 2, 5) = false Then Call PlayerMsg(Index, "You do not currently have the rabbit feet, please return when you do.", 12) Else Call TakeItem(index, 2, 5) Call GiveItem(index, 1, 10) Call PlayerMsg(index, "Now that you know the basics of combat, take this gold and go to Trainer Kude there, he'll tell you what to do next.", 12) Call SetPlayerExp(index, Exp + x) Call PlayerMsg(Index, "+10 EXP", 15) Call SendStats(index) End If Else Call PlayerMsg(index, "Sorry, but this tutorial is for new adventurers.", 12) End If Exit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```This is my Scripted NPC sub in Main.txt, but it won't work… I put in my quest script, then went to NPC Editor and chose scripted npc on the tutor I made. I then chose script 0 went to the tutor and tried to talk to him, but nothing happened... help? Link to comment Share on other sites More sharing options...
balliztik1 Posted August 11, 2008 Share Posted August 11, 2008 > Sub ScriptedNPC(Index, Script)> Select Case Script> Case 0> Dim Exp> Dim x> Dim y> Dim z> Dim a> > Exp = GetplayerExp(index)> > x = 10> y = 20> z = 30> a = 5 > If GetPlayerLevel(Index) <=5 Then> Call PlayerMsg(index, "Hi! I'm Trainer Lar, and I'm here to teach melee combat! It's quite simple! Go out and use the CTRL key to attack some rabbits! Bring me back five rabbit feet.", 12)> If CanTake(Index, 2, 5) = false Then> Call PlayerMsg(Index, "You do not currently have the rabbit feet, please return when you do.", 12)> Else> Call TakeItem(index, 2, 5)> Call GiveItem(index, 1, 10)> Call PlayerMsg(index, "Now that you know the basics of combat, take this gold and go to Trainer Kude there, he'll tell you what to do next.", 12)> Call SetPlayerExp(index, Exp + x)> Call PlayerMsg(Index, "+10 EXP", 15)> Call SendStats(index)> End If> Else> Call PlayerMsg(index, "Sorry, but this tutorial is for new adventurers.", 12)> End If> Exit Sub> > Case Else> Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)> Exit Sub> End Select> End Sub Link to comment Share on other sites More sharing options...
Orechalcos Posted August 11, 2008 Author Share Posted August 11, 2008 lol oops, forgot the then… thanks Link to comment Share on other sites More sharing options...
Orechalcos Posted August 11, 2008 Author Share Posted August 11, 2008 I just added in the then i missed, and reloaded the scripts, but when I talk to my NPC, all he says is the Hi I'm Trainer Lar…etc. bit. He won't say that I don't have the rabbit feet or that I do have them... Link to comment Share on other sites More sharing options...
dg1423 Posted August 11, 2008 Share Posted August 11, 2008 do you have the give and takeitem subs in your main? Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 12, 2008 Share Posted August 12, 2008 dont forget cantakeif you need them install this script by godlordhe is the lord of gods and sadly departed from these forums recentlyhttp://www.touchofdeathforums.com/smf/index.php/topic,28174.0.html Link to comment Share on other sites More sharing options...
Orechalcos Posted August 13, 2008 Author Share Posted August 13, 2008 Oh yeah, thanks, it works now, however, when I get my currency as a drop or a reward from the quest, it says Gold (0). In my script i said to give me 10g, but i got 0. Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 13, 2008 Share Posted August 13, 2008 its strange i seem to have that problem also maybe its a source bug Link to comment Share on other sites More sharing options...
dg1423 Posted August 13, 2008 Share Posted August 13, 2008 lol, it's cuz you're using GiveItem, you need to use GiveCurrency. In GiveItem the third variable is for Dur. xD Basically the way you put it, it's giving you a Gold with 0 Value and 10 Dur. :P Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 13, 2008 Share Posted August 13, 2008 no i wasnt using that script i was using the ee sys no script at all (tried it on my little brothers computer) 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