Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Proofread Please =)


Recommended Posts

```
' Executes whenever a scripted NPC does an action.'
Sub ScriptedNPC(Index, Script)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)
Exit Sub

Case 1
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest6") = "Have" Then
Call playermsg(index, "Thanks for doing that, I see you found the chests of Gold in there, that was for you.", 14)
  Exit Sub
End If
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest8") = "Have" Then
  Call playermsg(index, "Please get this delivered, just use it on the door", 14)
  Exit Sub
End if
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "You don't have enough slots!", RED)
  Exit Sub
End If
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest8", "Have")
Call GiveItem(Index, 261, 1)
Call playermsg(index, "Could you take this to the room over there with the rug", 14)

Case 2
If CanTake(Index, 269, 1) Then
  Call TakeItem(Index, 269, 1)
  Call GiveItem(Index, 270, 1)
  Call playermsg(index, "You Cook the meat", 14)
  Exit Sub
End if
If CanTake(Index, 269, 1) = FALSE Then
Call playermsg(index, "You have no meat to cook", 14)
End If

Case 3
If CanTake(Index, 272, 1) Then
  Call TakeItem(Index, 272, 1)
  Call GiveItem(Index, 273, 1)
  Call playermsg(index, "You Cook the meat", 14)
  Exit Sub
End if
If CanTake(Index, 272, 1) = FALSE Then
Call playermsg(index, "You have no meat to cook", 14)
End If

Case 4

If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest11") = "Have" Then
  Call playermsg(index, "You can only do this quest once", 14)
  Exit Sub
  End if 
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "Hey, clear out a slot, and come back to me!", RED)
  Exit Sub
End if
If CanTake(Index, 178, 1) Then
  Call GiveCurrency(Index, 277, 1)
  Call playermsg(index, "You hand Her your graveyard key, She then hands it back", 14)
  Call playermsg(index, "Thanks, I just never got to see one before!", 14)
  Call playermsg(index, "She hands you 125 Gold QUEST COMPLETE", 14)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest11", "Have") 
  Exit Sub
Else
Call playermsg(index, "Oh... You don't have it...", 14)
Exit Sub
End if

Case 5
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12") = "Have" Then
  Call playermsg(index, "Thanks.. but I don't need your help anymore!", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13") = "Have" Then
  Call playermsg(index, "Oh, did you tell him, what did he say?", 14)
  Call playermsg(index, "So, he said you were wrong, and to go away?", 14)
  Call playermsg(index, "Oh well, I guess I will have to go down there and explain it to him", 14)
  Call playermsg(index, "Thanks for your help, I, OH, here you go, it is not much, but...", 14)
  Call GiveCurrency(Index, 2, 50)
  Call playermsg(index, "There is some gold for your troubles, Thank you!", 14)
    Call playermsg(index, "You Gain 50 Gold, QUEST COMPLETE", 10)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12", "Have") 
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14") = "Have" Then
Call playermsg(index, "I Don't Quite Know where he's got to, but he has to be around town", 14)
Call playermsg(index, "He is the small boy in the stripped tee shirt", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest2") = "Have" Then
Call playermsg(index, "Hey you, are you interested in making some cash?", 14)
Call playermsg(index, "Good, could you go down there and set him streight", 14)
Call playermsg(index, "QUEST STARTED: Bad Kid", 15)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14", "Have") 
Exit Sub
End if

Case 6
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12") = "Have" Then
  Call playermsg(index, "Hmph, My Mommy says you told on me, I don't like you!!", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13") = "Have" Then
  Call playermsg(index, "I Won't go, I WON'T I WON'T I WON'T", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14") = "Have" Then
  Call playermsg(index, "What, OH, My Mommy Wants me, well, I won't go,", 4)
    Call playermsg(index, "And you Can't Make Me!!!!!", 4)
  Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13", "Have")
  Exit Sub
End if

Case 7
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest16") = "Have" Then
  Call playermsg(index, "Thank you again, but I don't actually need the gem...", 14)
  Exit Sub
  End if 
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "Listen, you need to make room so I can give this to you", RED)
  Exit Sub
End if
If CanTake(Index, 250, 0) Then
  Call GiveItem(Index, 281, 1)
  Call playermsg(index, "Oh, you got it.. (that was fast). oh, I should offer you payment", 14)
  Call playermsg(index, "For your deed, how does 1000 gold sound *he hands you a bag of money*", 14)
  Call playermsg(index, "QUEST COMPLETE", 2)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest16", "Have") 
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest15") = "Have" Then
Call playermsg(index, "Could you do this for me, Please!!", 14)
  Exit Sub
End if
Call playermsg(index, "Hello you there, yes you, I would like to go on an expedition", 14)
Call playermsg(index, "When I was a little boy, my father was taken away from me by a 3-headed dog", 14)
Call playermsg(index, "The dog ran away into the cave and ate him, I would like to avenge my father!", 14)
Call playermsg(index, "So, I would like to get the rarest gem in all the lands, the Gem of Death to help bring him back", 14)
Call playermsg(index, "QUEST STARTED: Gemeni Of Gems", 10)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest15", "Have")

Case Else
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub

```It just doesn't work…
Link to comment
Share on other sites

I'm going to just go through this again… Idk what's wrong, but I'll change what it has on it to what I would've done...
```
' Executes whenever a scripted NPC does an action.'
Sub ScriptedNPC(Index, Script)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)
Exit Sub

Case 1
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest6") = "Have" Then
Call playermsg(index, "Thanks for doing that, I see you found the chests of Gold in there, that was for you.", 14)
  Exit Sub
End If
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest8") = "Have" Then
  Call playermsg(index, "Please get this delivered, just use it on the door", 14)
  Exit Sub
End if
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "You don't have enough slots!", RED)
  Exit Sub
End If
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest8", "Have")
Call GiveItem(Index, 261, 1)
Call playermsg(index, "Could you take this to the room over there with the rug", 14)

Case 2
If CanTake(Index, 269, 1) Then
  Call TakeItem(Index, 269, 1)
  Call GiveItem(Index, 270, 1)
  Call playermsg(index, "You Cook the meat", 14)
  Exit Sub
End if
If CanTake(Index, 269, 1) = FALSE Then
Call playermsg(index, "You have no meat to cook", 14)
End If

Case 3
If CanTake(Index, 272, 1) Then
  Call TakeItem(Index, 272, 1)
  Call GiveItem(Index, 273, 1)
  Call playermsg(index, "You Cook the meat", 14)
  Exit Sub
End if
If CanTake(Index, 272, 1) = FALSE Then
Call playermsg(index, "You have no meat to cook", 14)
End If

Case 4

If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest11") = "Have" Then
  Call playermsg(index, "You can only do this quest once", 14)
  Exit Sub
  End if 
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "Hey, clear out a slot, and come back to me!", RED)
  Exit Sub
End if
If CanTake(Index, 178, 1) Then
  Call GiveCurrency(Index, 277, 1)
  Call playermsg(index, "You hand Her your graveyard key, She then hands it back", 14)
  Call playermsg(index, "Thanks, I just never got to see one before!", 14)
  Call playermsg(index, "She hands you 125 Gold QUEST COMPLETE", 14)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest11", "Have") 
  Exit Sub
Else
Call playermsg(index, "Oh... You don't have it...", 14)
Exit Sub
End if

Case 5
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12") = "Have" Then
  Call playermsg(index, "Thanks.. but I don't need your help anymore!", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13") = "Have" Then
  Call playermsg(index, "Oh, did you tell him, what did he say?", 14)
  Call playermsg(index, "So, he said you were wrong, and to go away?", 14)
  Call playermsg(index, "Oh well, I guess I will have to go down there and explain it to him", 14)
  Call playermsg(index, "Thanks for your help, I, OH, here you go, it is not much, but...", 14)
  Call GiveCurrency(Index, 2, 50)
  Call playermsg(index, "There is some gold for your troubles, Thank you!", 14)
    Call playermsg(index, "You Gain 50 Gold, QUEST COMPLETE", 10)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12", "Have") 
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14") = "Have" Then
Call playermsg(index, "I Don't Quite Know where he's got to, but he has to be around town", 14)
Call playermsg(index, "He is the small boy in the stripped tee shirt", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest2") = "Have" Then
Call playermsg(index, "Hey you, are you interested in making some cash?", 14)
Call playermsg(index, "Good, could you go down there and set him streight", 14)
Call playermsg(index, "QUEST STARTED: Bad Kid", 15)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14", "Have") 
Exit Sub
End if

Case 6
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest12") = "Have" Then
  Call playermsg(index, "Hmph, My Mommy says you told on me, I don't like you!!", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13") = "Have" Then
  Call playermsg(index, "I Won't go, I WON'T I WON'T I WON'T", 14)
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest14") = "Have" Then
  Call playermsg(index, "What, OH, My Mommy Wants me, well, I won't go,", 4)
    Call playermsg(index, "And you Can't Make Me!!!!!", 4)
  Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest13", "Have")
  Exit Sub
End if

Case 7
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest16") = "Have" Then
  Call playermsg(index, "Thank you again, but I don't actually need the gem...", 14)
  Exit Sub
  End if 
If GetFreeSlots(Index) = 0 Then
  Call PlayerMsg(Index, "Listen, you need to make room so I can give this to you", RED)
  Exit Sub
End if
If CanTake(Index, 250, 1) Then
  Call GiveItem(Index, 281, 1)
  Call playermsg(index, "Oh, you got it.. (that was fast). oh, I should offer you payment", 14)
  Call playermsg(index, "For your deed, how does 1000 gold sound *he hands you a bag of money*", 14)
  Call playermsg(index, "QUEST COMPLETE", 2)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest16", "Have") 
  Exit Sub
End if
If GetVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest15") = "Have" Then
Call playermsg(index, "Could you do this for me, Please!!", 14)
  Exit Sub
End if
Call playermsg(index, "Hello you there, yes you, I would like to go on an expedition", 14)
Call playermsg(index, "When I was a little boy, my father was taken away from me by a 3-headed dog", 14)
Call playermsg(index, "The dog ran away into the cave and ate him, I would like to avenge my father!", 14)
Call playermsg(index, "So, I would like to get the rarest gem in all the lands, the Gem of Death to help bring him back", 14)
Call playermsg(index, "QUEST STARTED: Gemeni Of Gems", 10)
Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest15", "Have")

Case Else
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub

```I did that very quick…only changed one or two things, I really doubt it did anything...
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...