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

Eclipse Stable To Origins


ImmortalDreams
 Share

Recommended Posts

EDIT

Because Robin is so insistent on blocking any posts having to do with older versions of Eclipse, and because Origins is supposed to be better in about a million ways, how would I go about recoding and redoing all the things I spent hours on?

I started my project long before Origins came out. If I hadn't I would have used it instead. I'm a decent coder but VB6 isn't something I'm at all familiar with. I'm eager to learn though.

I have VB6 so I do intend to add some features to the source from various tutorials , but can anyone tell me how I could possibly turn these into Origins material?

See part of the code here: [http://pastebin.com/embed_js.php?i=uNxUC9q8"](http://pastebin.com/embed_js.php?i=uNxUC9q8)

So yeah. As you can see, this was a lot of work, and aside from using cloudwolf's quest maker in part, I did this all by myself. I'd hate to see it all go to waste so if anyone can give me some tips or point me in the right direction I would be very grateful.
Link to comment
Share on other sites

MenuScripts(includes my skill system and some quest stuff):
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: MenuScripts.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: MenuScripts '
' Brief: executes when a player clicks on a custom menu. '
' Parameters: '
' Index: the index number of the player who clicked. '
' ElementIndex: the index number of the clicked element. '
' ElementType: the type of the clicked element. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub MenuScripts(Index, ElementIndex, ElementType)
Dim MenuTitle
Dim FieldMessage

MenuTitle = GetPlayerMenuClickTitle(Index)
FieldMessage = GetPlayerMenuClickMsg(Index)

Call PutCharVar(Index, "Menu", "Title", MenuTitle)

Select Case MenuTitle
Case "hello"
Select Case ElementType
Case ELEMENT_PICTURE
Call PlayerMsg(Index, "You clicked on picture number " & ElementIndex & "!", YELLOW)

Case ELEMENT_FIELD
Call PlayerMsg(Index, "You clicked on field number " & ElementIndex & "!", YELLOW)

Case ELEMENT_LABEL
Call PlayerMsg(Index, "You clicked on label number " & ElementIndex & "!", YELLOW)

Case Else
Call PlayerMsg(Index, "Unknown element type!", BRIGHTRED)
End Select

Case "Quest8"
Select Case ElementType
Case ELEMENT_PICTURE
If ElementIndex = 1 Then
Call CustomMenuClose(Index)
text = "Jess: You've gota know! Everyone should know!" & vbNewLine & vbNewLine & "Mr. O'Riley: It's those woods. Gregory's Woods you call 'em. Ever since that creepy hermit Gregory moved there five years ago, we've been getting  a heck lot more monsters around here." & vbNewLine & vbNewLine & "Jess: I swear to god they must have come from the Dark Realm itself!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Are you accusing Gregory of bringing the monsters here?" & vbNewLine & vbNewLine & "Mr. O'Riley: Hell yeah! Who else? They all showed up around the same time." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": But I met Gregory! He didn't seem so bad." & vbNewLine & vbNewLine & "Mr. O'Riley/Jess: YOU MET HIM?!!" & vbNewLine & vbNewLine & "Jess: Maybe yer contaminated!"
Call CustomMenuShow(index, "Quest8_2", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 2, text, 0, 0, 8, 1, 0, 286, 315)
Call CustomMenuPicture(index, 0, "\GUI\Button_Previous.bmp", 10, 275)
Call CustomMenuPicture(index, 1, "\GUI\Button_Next.bmp", 245, 275)
End If
End Select

Case "Quest8_2"
Select Case ElementType
Case ELEMENT_PICTURE
If ElementIndex = 0 Then
Call CustomMenuClose(Index)
text = "Jess: Hey daddy, it's one of them city folks!" & vbNewLine & vbNewLine & "Mr. O'Riley: About time they sent someone out here. We've been waiting long enough." & vbNewLine & vbNewLine & "Jess: That's an understatement." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": What's the big deal? I come from Caderlene, sure, but--" & vbNewLine & vbNewLine & "Jess: You hear that daddy? This one's from the capital!" & vbNewLine & vbNewLine & "Mr. O'Riley: Thank the lord! Our salvation is at hand!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": WHOA! Slow down guys. What's going on?" & vbNewLine & vbNewLine & "They stare at you blankly for awhile." & vbNewLine & vbNewLine & "Mr. O'Riley: You mean you don't know?"
Call CustomMenuShow(index, "Quest8", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 2, text, 0, 0, 8, 1, 0, 286, 315)
Call CustomMenuPicture(index, 1, "\GUI\Button_Next.bmp", 245, 275)
End If

If ElementIndex = 1 Then
Call CustomMenuClose(Index)
text = "Mr. O'Riley: or insane!" & vbNewLine & vbNewLine & "Jess: Or maybe yer---" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Shut up! Just shut up!" & vbNewLine & vbNewLine & "They stop talking." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Now what can I do that will put you at ease?" & vbNewLine & vbNewLine & "Mr. O'Riley: Make 'em leave and make sure 'e never comes back!"
Call CustomMenuShow(index, "Quest8_3", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 2, text, 0, 0, 8, 1, 0, 286, 315)
Call CustomMenuPicture(index, 0, "\GUI\Button_Previous.bmp", 10, 275)
End If

End Select

Case "Quest8_3"
Select Case ElementType
Case ELEMENT_PICTURE
If ElementIndex = 0 Then
Call CustomMenuClose(Index)
text = "Jess: You've gotta know! Everyone should know!" & vbNewLine & vbNewLine & "Mr. O'Riley: It's those woods. Gregory's Woods you call 'em. Ever since that creepy hermit Gregory moved there five years ago, we've been getting  a heck lot more monsters around here." & vbNewLine & vbNewLine & "Jess: I swear to god they must have come from the Dark Realm itself!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Are you accusing Gregory of bringing the monsters here?" & vbNewLine & vbNewLine & "Mr. O'Riley: Hell yeah! Who else? They all showed up around the same time." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": But I met Gregory! He didn't seem so bad." & vbNewLine & vbNewLine & "Mr. O'Riley/Jess: YOU MET HIM?!!" & vbNewLine & vbNewLine & "Jess: Maybe yer contaminated!"
Call CustomMenuShow(index, "Quest8_2", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 2, text, 0, 0, 8, 1, 0, 286, 315)
Call CustomMenuPicture(index, 0, "\GUI\Button_Previous.bmp", 10, 275)
Call CustomMenuPicture(index, 1, "\GUI\Button_Next.bmp", 245, 275)
End If
End Select

Case "Skills"
Select Case ElementType
Case ELEMENT_PICTURE

If ElementIndex = 5 Then
Call CustomMenuLabel(Index, 19, "Cooking", 104, 8, 8, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 23,"Level: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "Level"), 104, 30, 7, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 37,"XP: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP") & "/" & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "Next_Level"), 104, 50, 7, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 38,"Total XP: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "TotalXP"), 104, 70, 7, 7, 0, 286, 315)

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2" Then
Call CustomMenuClose(Index)
Call CustomMenuShow(Index, "Skills", "\GUI\Skills.bmp", 1)

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "1") And (CanTake(Index, 6, 1)) Then
Call CustomMenuPicture(Index, 1, "\GUI\Skills\Mining\Button_Mining.bmp", 0, 0)
Else
Call CustomMenuPicture(Index, 1, "\GUI\Skills\Mining\Button_Null_Mining.bmp", 0, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 2, "\GUI\Skills\Fishing\Button_Fishing.bmp", 0, 32)
Else
Call CustomMenuPicture(Index, 2, "\GUI\Skills\Fishing\Button_Null_Fishing.bmp", 0, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 4, "\GUI\Skills\Farming\Button_Farming.bmp", 0, 64)
Else
Call CustomMenuPicture(Index, 4, "\GUI\Skills\Farming\Button_Null_Farming.bmp", 0, 64)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "1") Or (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) >= "2") Then
Call CustomMenuPicture(Index, 3, "\GUI\Skills\Smith\Button_Smith.bmp", 32, 0)
Else
Call CustomMenuPicture(Index, 3, "\GUI\Skills\Smith\Button_Null_Smith.bmp", 32, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 18, "\GUI\Skills\Craft\Button_Craft.bmp", 32, 32)
Else
Call CustomMenuPicture(Index, 18, "\GUI\Skills\Craft\Button_Null_Craft.bmp", 32, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 5, "\GUI\Skills\Cook\Button_Cook.bmp", 32, 64)
Else
Call CustomMenuPicture(Index, 5, "\GUI\Skills\Cook\Button_Null_Cook.bmp", 32, 64)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) >= "2") Then
Call CustomMenuPicture(Index, 22, "\GUI\Skills\Herbalist\Button_Herbalist.bmp", 64, 0)
Else
Call CustomMenuPicture(Index, 22, "\GUI\Skills\Herbalist\Button_Null_Herbalist.bmp", 64, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest170" ) >= "2") Then
Call CustomMenuPicture(Index, 20, "\GUI\Skills\Enchant\Button_Enchant.bmp", 64, 32)
Else
Call CustomMenuPicture(Index, 20, "\GUI\Skills\Enchant\Button_Null_Enchant.bmp", 64, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Necromancy" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 21, "\GUI\Skills\Necromancy\Button_Necromancy.bmp", 64, 64)
Else
Call CustomMenuPicture(Index, 21, "\GUI\Skills\Necromancy\Button_Null_Necromancy.bmp", 64, 64)
End If

If GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "1" Then

If CanTake(Index, 56, 1) = True Then
Call CustomMenuPicture(Index, 30, "\GUI\Skills\Cook\Button_Fish.bmp", 0, 96)
Else
Call CustomMenuPicture(Index, 30, "\GUI\Skills\Cook\Button_Null_Fish.bmp", 0, 96)
End If

If CanTake(Index, 57, 1) = True Then
Call CustomMenuPicture(Index, 31, "\GUI\Skills\Cook\Button_Squid.bmp", 32, 96)
Else
Call CustomMenuPicture(Index, 31, "\GUI\Skills\Cook\Button_Null_Squid.bmp", 32, 96)
End If

If CanTake(Index, 58, 1) = True Then
Call CustomMenuPicture(Index, 32, "\GUI\Skills\Cook\Button_Lobster.bmp", 64, 96)
Else
Call CustomMenuPicture(Index, 32, "\GUI\Skills\Cook\Button_Null_Lobster.bmp", 64, 96)
End If

If CanTake(Index, 81, 1) = True Then
Call CustomMenuPicture(Index, 33, "\GUI\Skills\Cook\Button_SmallMeat.bmp", 96, 96)
Else
Call CustomMenuPicture(Index, 33, "\GUI\Skills\Cook\Button_Null_SmallMeat.bmp", 96, 96)
End If

If CanTake(Index, 83, 1) = True Then
Call CustomMenuPicture(Index, 34, "\GUI\Skills\Cook\Button_BigMeat.bmp", 128, 96)
Else
Call CustomMenuPicture(Index, 34, "\GUI\Skills\Cook\Button_Null_BigMeat.bmp", 128, 96)
End If

If (CanTake(Index, 85, 1) = True) And (CanTake(Index, 26, 1) = True) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Bread.bmp", 32, 128)
Else
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If

End If
End If
End If

If ElementIndex = 30 Then
If CanTake(Index, 56, 1) = True Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 78, 1)
Call TakeItem(Index, 56, 1)
Call PlayerMsg(Index, "You successfully cook a fish!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 12)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 12)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 56, 1) Then
Call CustomMenuPicture(Index, 30, "\GUI\Skills\Cook\Button_Null_Fish.bmp", 0, 96)
End If
Else
Call TakeItem(Index, 56, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 56, 1) Then
Call CustomMenuPicture(Index, 30, "\GUI\Skills\Cook\Button_Null_Fish.bmp", 0, 96)
End If
End If
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "2" Then
Call GiveCurrency(Index, 78, 1)
Call TakeItem(Index, 56, 1)
Call PlayerMsg(Index, "You successfully cook a fish!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 12)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 12)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 56, 1) Then
Call CustomMenuPicture(Index, 30, "\GUI\Skills\Cook\Button_Null_Fish.bmp", 0, 96)
End If

If CanTake(Index, 78, 10) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17", "3")
End If
End If
End If
End If

If ElementIndex = 31 Then
If CanTake(Index, 57, 1) = True Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 79, 1)
Call TakeItem(Index, 57, 1)
Call PlayerMsg(Index, "You successfully cook a squid!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 25)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 57, 1) Then
Call CustomMenuPicture(Index, 31, "\GUI\Skills\Cook\Button_Null_Squid.bmp", 32, 96)
End If
Else
Call TakeItem(Index, 57, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 57, 1) Then
Call CustomMenuPicture(Index, 31, "\GUI\Skills\Cook\Button_Null_Squid.bmp", 32, 96)
End If
End If
End If
End If
End If

If ElementIndex = 32 Then
If CanTake(Index, 58, 1) = True Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 80, 1)
Call TakeItem(Index, 58, 1)
Call PlayerMsg(Index, "You successfully cook a lobster!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 50)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 50)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 58, 1) Then
Call CustomMenuPicture(Index, 32, "\GUI\Skills\Cook\Button_Null_Lobster.bmp", 64, 96)
End If
Else
Call TakeItem(Index, 58, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 58, 1) Then
Call CustomMenuPicture(Index, 32, "\GUI\Skills\Cook\Button_Null_Lobster.bmp", 64, 96)
End If
End If
End If
End If
End If

If ElementIndex = 33 Then
If CanTake(Index, 81, 1) = True Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 82, 1)
Call TakeItem(Index, 81, 1)
Call PlayerMsg(Index, "You successfully cook a small piece of meat!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 12)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 12)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 81, 1) Then
Call CustomMenuPicture(Index, 33, "\GUI\Skills\Cook\Button_Null_SmallMeat.bmp", 96, 96)
End If
Else
Call TakeItem(Index, 81, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 81, 1) Then
Call CustomMenuPicture(Index, 33, "\GUI\Skills\Cook\Button_Null_SmallMeat.bmp", 96, 96)
End If
End If
End If
End If
End If

If ElementIndex = 34 Then
If CanTake(Index, 83, 1) = True Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 84, 1)
Call TakeItem(Index, 83, 1)
Call PlayerMsg(Index, "You successfully cook a piece of meat!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 50)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 50)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 83, 1) Then
Call CustomMenuPicture(Index, 34, "\GUI\Skills\Cook\Button_Null_BigMeat.bmp", 128, 96)
End If
Else
Call TakeItem(Index, 83, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 83, 1) Then
Call CustomMenuPicture(Index, 34, "\GUI\Skills\Cook\Button_Null_BigMeat.bmp", 128, 96)
End If
End If
End If
End If
End If

If ElementIndex = 35 Then
If (CanTake(Index, 85, 1) = True) And (CanTake(Index, 26, 1) = True) Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 25, 5)
Call TakeItem(Index, 85, 1)
Call TakeItem(Index, 26, 1)
Call PlayerMsg(Index, "You successfully bake some rolls!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 25)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 85, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If

If Not CanTake(Index, 26, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If
Else
Call TakeItem(Index, 85, 1)
Call TakeItem(Index, 26, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 85, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If

If Not CanTake(Index, 26, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If
End If
End If
End If
End If

If ElementIndex = 36 Then
If (CanTake(Index, 85, 1) = True) And (CanTake(Index, 26, 1) = True) Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) = "4" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 24, 1)
Call TakeItem(Index, 85, 1)
Call TakeItem(Index, 26, 1)
Call PlayerMsg(Index, "You successfully bake a loaf of bread!", WHITE)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", + 25)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 85, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If

If Not CanTake(Index, 26, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If
Else
Call TakeItem(Index, 85, 1)
Call TakeItem(Index, 26, 1)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 85, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If

If Not CanTake(Index, 26, 1) Then
Call CustomMenuPicture(Index, 35, "\GUI\Skills\Cook\Button_Null_Roll.bmp", 0, 128)
Call CustomMenuPicture(Index, 36, "\GUI\Skills\Cook\Button_Null_Bread.bmp", 32, 128)
End If
End If
End If
End If
End If

If ElementIndex = 3 Then
Call CustomMenuLabel(Index, 19, "Smithing", 104, 8, 8, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 23,"Level: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "Level"), 104, 30, 7, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 37,"XP: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "XP") & "/" & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "Next_Level"), 104, 50, 7, 7, 0, 286, 315)
Call CustomMenuLabel(Index, 38,"Total XP: " & GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "TotalXP"), 104, 70, 7, 7, 0, 286, 315)

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) >= "2" Then
Call CustomMenuClose(Index)
Call CustomMenuShow(Index, "Skills", "\GUI\Skills.bmp", 1)

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "1") And (CanTake(Index, 6, 1)) Then
Call CustomMenuPicture(Index, 1, "\GUI\Skills\Mining\Button_Mining.bmp", 0, 0)
Else
Call CustomMenuPicture(Index, 1, "\GUI\Skills\Mining\Button_Null_Mining.bmp", 0, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 2, "\GUI\Skills\Fishing\Button_Fishing.bmp", 0, 32)
Else
Call CustomMenuPicture(Index, 2, "\GUI\Skills\Fishing\Button_Null_Fishing.bmp", 0, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 4, "\GUI\Skills\Farming\Button_Farming.bmp", 0, 64)
Else
Call CustomMenuPicture(Index, 4, "\GUI\Skills\Farming\Button_Null_Farming.bmp", 0, 64)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "1") Or (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) >= "2") Then
Call CustomMenuPicture(Index, 3, "\GUI\Skills\Smith\Button_Smith.bmp", 32, 0)
Else
Call CustomMenuPicture(Index, 3, "\GUI\Skills\Smith\Button_Null_Smith.bmp", 32, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 18, "\GUI\Skills\Craft\Button_Craft.bmp", 32, 32)
Else
Call CustomMenuPicture(Index, 18, "\GUI\Skills\Craft\Button_Null_Craft.bmp", 32, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 5, "\GUI\Skills\Cook\Button_Cook.bmp", 32, 64)
Else
Call CustomMenuPicture(Index, 5, "\GUI\Skills\Cook\Button_Null_Cook.bmp", 32, 64)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) >= "2") Then
Call CustomMenuPicture(Index, 22, "\GUI\Skills\Herbalist\Button_Herbalist.bmp", 64, 0)
Else
Call CustomMenuPicture(Index, 22, "\GUI\Skills\Herbalist\Button_Null_Herbalist.bmp", 64, 0)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting" ) = "0") And (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest170" ) >= "2") Then
Call CustomMenuPicture(Index, 20, "\GUI\Skills\Enchant\Button_Enchant.bmp", 64, 32)
Else
Call CustomMenuPicture(Index, 20, "\GUI\Skills\Enchant\Button_Null_Enchant.bmp", 64, 32)
End If

If (GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Necromancy" ) = "1") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest17" ) >= "2") Then
Call CustomMenuPicture(Index, 21, "\GUI\Skills\Necromancy\Button_Necromancy.bmp", 64, 64)
Else
Call CustomMenuPicture(Index, 21, "\GUI\Skills\Necromancy\Button_Null_Necromancy.bmp", 64, 64)
End If

If GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting" ) = "1" Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)

Call CustomMenuPicture(Index, 14, "\GUI\Skills\Smith\Button_Null_SteelShield.bmp", 0, 160)
Call CustomMenuPicture(Index, 15, "\GUI\Skills\Smith\Button_Null_SteelSword.bmp", 32, 160)
Call CustomMenuPicture(Index, 16, "\GUI\Skills\Smith\Button_Null_2HandSteelSword.bmp", 64, 160)
Call CustomMenuPicture(Index, 17, "\GUI\Skills\Smith\Button_Null_SteelBody.bmp", 96, 160)

If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 8, 5) = True) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_IronBar.bmp", 0, 96)
Else
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If

If (CanTake(Index, 10, 4) = True) And (CanTake(Index, 8, 7) = True) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_SteelBar.bmp", 32, 96)
Else
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 9, 5) = True) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_SilverBar.bmp", 64, 96)
Else
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
End If

If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 11, 5) = True) Then
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_GoldBar.bmp", 96, 96)
Else
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
End If

End If

If GetVar( "Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing" ) = "1" Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 5) = True) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_IronShield.bmp", 0, 128)
Else
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 5) = True) Then
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_IronSword.bmp", 32, 128)
Else
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 7) = True) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_2HandIronSword.bmp", 64, 128)
Else
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 15) = True) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_IronBody.bmp", 96, 128)
Else
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 31, 5) = True) Then
Call CustomMenuPicture(Index, 14, "\GUI\Skills\Smith\Button_SteelShield.bmp", 0, 160)
Else
Call CustomMenuPicture(Index, 14, "\GUI\Skills\Smith\Button_Null_SteelShield.bmp", 0, 160)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 31, 5) = True) Then
Call CustomMenuPicture(Index, 15, "\GUI\Skills\Smith\Button_SteelSword.bmp", 32, 160)
Else
Call CustomMenuPicture(Index, 15, "\GUI\Skills\Smith\Button_Null_SteelSword.bmp", 32, 160)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 31, 7) = True) Then
Call CustomMenuPicture(Index, 16, "\GUI\Skills\Smith\Button_2HandSteelSword.bmp", 64, 160)
Else
Call CustomMenuPicture(Index, 16, "\GUI\Skills\Smith\Button_Null_2HandSteelSword.bmp", 64, 160)
End If

If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 31, 15) = True) Then
Call CustomMenuPicture(Index, 17, "\GUI\Skills\Smith\Button_SteelBody.bmp", 96, 160)
Else
Call CustomMenuPicture(Index, 17, "\GUI\Skills\Smith\Button_Null_SteelBody.bmp", 96, 160)
End If

End If

End If
End If

If ElementIndex = 6 Then
If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 8, 5) = True) Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) = "5" Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 29, 1)
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 8, 5)
Call PlayerMsg(Index, "You successfully make an iron bar!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 12)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 8, 7) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
End If

If Not CanTake(Index, 8, 5) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If
Else
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 8, 5)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 8, 7) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)

End If

If Not CanTake(Index, 8, 5) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If
End If
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) = "2" Then
Call GiveCurrency(Index, 29, 1)
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 8, 5)
Call PlayerMsg(Index, "You successfully make an iron bar!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 12)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 8, 7) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)

End If

If Not CanTake(Index, 8, 5) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If

If CanTake(Index, 29, 5) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11", "3")
End If
End If
End If
End If

If ElementIndex = 7 Then
If (CanTake(Index, 10, 4) = True) And (CanTake(Index, 8, 7) = True) Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 31, 1)
Call TakeItem(Index, 10, 4)
Call TakeItem(Index, 8, 7)
Call PlayerMsg(Index, "You successfully make a steel bar!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 8, 7) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)

End If

If Not CanTake(Index, 8, 5) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If

Else
Call TakeItem(Index, 10, 4)
Call TakeItem(Index, 8, 7)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 8, 7) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)

End If

If Not CanTake(Index, 8, 5) Then
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If
End If
End If

End If

If ElementIndex = 8 Then
If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 9, 5) = True) Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 30, 1)
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 9, 5)
Call PlayerMsg(Index, "You successfully make a silver bar!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)

End If

If Not CanTake(Index, 9, 5) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
End If

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If
Else
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 9, 5)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)

End If

If Not CanTake(Index, 9, 5) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
End If

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If
End If
End If
End If

If ElementIndex = 9 Then
If (CanTake(Index, 10, 2) = True) And (CanTake(Index, 11, 5) = True) Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 32, 1)
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 11, 5)
Call PlayerMsg(Index, "You successfully make a gold bar!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If

If Not CanTake(Index, 11, 5) Then
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
End If
Else
Call TakeItem(Index, 10, 2)
Call TakeItem(Index, 11, 5)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 10, 4) Then
Call CustomMenuPicture(Index, 7, "\GUI\Skills\Smith\Button_Null_SteelBar.bmp", 32, 96)
End If

If Not CanTake(Index, 10, 2) Then
Call CustomMenuPicture(Index, 8, "\GUI\Skills\Smith\Button_Null_SilverBar.bmp", 64, 96)
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
Call CustomMenuPicture(Index, 6, "\GUI\Skills\Smith\Button_Null_IronBar.bmp", 0, 96)
End If

If Not CanTake(Index, 11, 5) Then
Call CustomMenuPicture(Index, 9, "\GUI\Skills\Smith\Button_Null_GoldBar.bmp", 96, 96)
End If
End If
End If
End If

If ElementIndex = 10 Then
If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 5) = True) Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 4, 1)
Call TakeItem(Index, 29, 5)
Call PlayerMsg(Index, "You successfully make an iron shield!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 50)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 29, 5) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If Not CanTake(Index, 29, 7) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
End If

If Not CanTake(Index, 29, 15) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If
Else
Call TakeItem(Index, 29, 5)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 29, 7) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If

If Not CanTake(Index, 29, 5) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If Not CanTake(Index, 29, 15) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If
End If
End If
End If

If ElementIndex = 11 Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) = "5" Then
If (CanTake(Index, 27, 1) = True) And (CanTake(Index, 29, 5) = True) Then
Chance = Rand(1, 2)
If Chance = 1 Then
Call GiveCurrency(Index, 22, 1)
Call TakeItem(Index, 29, 5)
Call PlayerMsg(Index, "You successfully make an iron sword!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 50)
Call PlayerLevelUp(Index)
Call SendStats(Index)

If Not CanTake(Index, 29, 7) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
End If

If Not CanTake(Index, 29, 5) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If Not CanTake(Index, 29, 15) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If

Else
Call TakeItem(Index, 29, 5)
Call PlayerMsg(Index, "You failed and lost your ingredients!", WHITE)

If Not CanTake(Index, 29, 7) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
End If

If Not CanTake(Index, 29, 5) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If Not CanTake(Index, 29, 15) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If
End If
End If
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11" ) = "3" Then
Call GiveCurrency(Index, 22, 1)
Call TakeItem(Index, 29, 5)
Call PlayerMsg(Index, "You successfully make an iron sword!", WHITE)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 25)
Call PlayerLevelUp(Index)
Call SendStats(Index)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest11", "4")
If Not CanTake(Index, 29, 7) Then
Call CustomMenuPicture(Index, 12, "\GUI\Skills\Smith\Button_Null_2HandIronSword.bmp", 64, 128)
End If

If Not CanTake(Index, 29, 5) Then
Call CustomMenuPicture(Index, 10, "\GUI\Skills\Smith\Button_Null_IronShield.bmp", 0, 128)
Call CustomMenuPicture(Index, 11, "\GUI\Skills\Smith\Button_Null_IronSword.bmp", 32, 128)
End If

If Not CanTake(Index, 29, 15) Then
Call CustomMenuPicture(Index, 13, "\GUI\Skills\Smith\Button_Null_IronBody.bmp", 96, 128)
End If
End If
End If

```
etc… it ran out of room
Link to comment
Share on other sites

OnNewChar(Includes some quest stuff):
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: OnNewChar.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: OnNewChar '
' Brief: executes when a player creates a new character. '
' Parameters: '
' Index: the index number of the player. '
' CharNum: the number of the created character. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnNewChar(Index, CharNum)
Call GiveCurrency(Index, 1, 25)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total", "0")

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Necromancy", "0")

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Mining", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Mining", "Next_Level",90)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Mining", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Mining", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Fishing", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Fishing", "Next_Level", 90)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Fishing", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Fishing", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Farming", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Farming", "Next_Level", 90)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Farming", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Farming", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "Next_Level", 120)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Smithing", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Crafting", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Crafting", "Next_Level", 120)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Crafting", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Crafting", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "Next_Level", 120)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Cooking", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Herbalist", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Herbalist", "Next_Level", 120)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Herbalist", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Herbalist", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Enchant", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Enchant", "Next_Level", 120)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Enchant", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Enchant", "TotalXP", 0)

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Necromancy", "Level", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Necromancy", "Next_Level", 380)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Necromancy", "XP", 0)
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Necromancy", "TotalXP", 0)

'Set Default Quest Status(the color) to red
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14_Status", 12)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15_Status", 12)

'Any class quests
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "Meet Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "Meet Aggie")

If GetPlayerClass(Index)=0 Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Max", "500")
'Squire only quests
End If

If GetPlayerClass(Index)=1 Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Max", "500")
End If
End Sub

```
Link to comment
Share on other sites

OnNPCDeath(Some more quest stuff):
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: OnNPCDeath.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: OnNPCDeath '
' Brief: executes when an NPC dies. '
' Parameters: '
' Index: the index of the player who killed the NPC. '
' Map: the map the NPC died on. '
' NPC: the NPC number. '
' MapNPC: the MapNPC number. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub OnNPCDeath(Index, Map, NPC, MapNPC)
Call BattleMsg(Index, "You killed a " & GetNPCName(NPC) & ".", BRIGHTRED, LEFT)

If NPC = 38 Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest13" ) = "1" Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest13", "2")
Call BattleMsg(Index, "Defeated 1/1 Kruckalens.", YELLOW, LEFT)
End If
End If

If NPC = 39 Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest15" ) > "7" Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest15", GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest15" ) + 1)
Quest15Kills = GetVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest15")
Call BattleMsg(Index, "Defeated " & Quest15Kills  - 1 & "/5 Ogers.", YELLOW, LEFT)
ElseIf Not GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest15" ) = "7" Then
Call BattleMsg(Index, "Defeated 5/5 Ogers.", YELLOW, LEFT)
End If
End If
End Sub

```
Link to comment
Share on other sites

PlayerLevelUp:
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: PlayerLevelUp.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: PlayerLevelUp '
' Brief: executes when a player levels up. '
' Parameters: '
' Index: the index number of the player. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub PlayerLevelUp(Index)
Dim PlayerExp

If GetPlayerExp(Index) < GetPlayerNextLevel(Index) Then
Exit Sub
End If

Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
PlayerExp = GetPlayerNextLevel(Index)

Call PlaySound(Index, "level_up.mp3")
Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
Call SetPlayerExp(Index, GetPlayerExp(Index) - PlayerExp)
Call SetPlayerHP(Index, GetPlayerMaxHP(Index))
Call SetPlayerMP(Index, GetPlayerMaxMP(Index))
Call SetPlayerSP(Index, GetPlayerMaxSP(Index))
Call SendPlayerData(Index)
Call SendStats(Index)
Call SendHP(Index)
Call SendMP(Index)
Call SendSP(Index)
Call SendPTS(Index)
Loop

If GetPlayerLevel(Index) = 5 Then

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "Find Sarah")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q6","Name17")
End If
End If

If GetPlayerLevel(Index) = 10 Then

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "Potion Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q10","Name17")
End If

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "Sword Making")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q11","Name17")
End If

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "Meet Lillian")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q17","Name17")
End If
End If

If GetPlayerLevel(Index) = 15 Then

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "A Poisonous Mistake")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q18","Name17")
End If
End If
End Sub

```
Link to comment
Share on other sites

ScriptedItem:
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: ScriptedItem.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: ScriptedItem '
' Brief: executes when somebody uses an item. '
' Parameters: '
' Index: the index of the player. '
' Script: the script to execute. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub ScriptedItem(Index, Script, Slot)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted item has no apparent use.", WHITE)

Exit Sub

Case 1
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 6)

Call PlayerMsg(Index, "You learn Air Breeze!", WHITE)
Call TakeItem(Index, 42, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 2
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 7)

Call PlayerMsg(Index, "You learn Water Breeze!", WHITE)
Call TakeItem(Index, 43, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 3
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 8)

Call PlayerMsg(Index, "You learn Earth Breeze!", WHITE)
Call TakeItem(Index, 44, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 4
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 9)

Call PlayerMsg(Index, "You learn Fire Breeze!", WHITE)
Call TakeItem(Index, 45, 1)

Else
Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 5
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 10)

Call PlayerMsg(Index, "You learn Air Wave!", WHITE)
Call TakeItem(Index, 66, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 6
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 11)

Call PlayerMsg(Index, "You learn Water Wave!", WHITE)
Call TakeItem(Index, 67, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 7
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 12)

Call PlayerMsg(Index, "You learn Earth Wave!", WHITE)
Call TakeItem(Index, 68, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 8
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 13)

Call PlayerMsg(Index, "You learn Fire Wave!", WHITE)
Call TakeItem(Index, 69, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 9
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 14)

Call PlayerMsg(Index, "You learn Air Shift!", WHITE)
Call TakeItem(Index, 70, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 10
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 15)

Call PlayerMsg(Index, "You learn Water Shift!", WHITE)
Call TakeItem(Index, 71, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 11
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 16)

Call PlayerMsg(Index, "You learn Earth Shift!", WHITE)
Call TakeItem(Index, 72, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 12
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 17)

Call PlayerMsg(Index, "You learn Fire Shift!", WHITE)
Call TakeItem(Index, 73, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 13
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 18)

Call PlayerMsg(Index, "You learn Air Flare!", WHITE)
Call TakeItem(Index, 74, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 14
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 19)

Call PlayerMsg(Index, "You learn Water Flare!", WHITE)
Call TakeItem(Index, 75, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 15
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 20)

Call PlayerMsg(Index, "You learn Earth Flare!", WHITE)
Call TakeItem(Index, 76, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub

Case 16
'If the player can learn the spell
If CanPlayerLearnSpell(Index) = True Then

'Learn the spell
    Call PlayerLearnSpell(Index, 21)

Call PlayerMsg(Index, "You learn Fire Flare!", WHITE)
Call TakeItem(Index, 77, 1)

Else

Call PlayerMsg(Index, "You can't learn any more spells!", RED)

End If
Exit Sub
Case 17
Call SetPlayerSPEED(Index, +2)
End Select
End Sub

```
Link to comment
Share on other sites

ScriptedNPC(I apologize for any out of place comments):
```
Sub ScriptedNPC(Index, Script)
Select Case Script

'Quest script created using cloudwolf00s Quest Maker (cloudwolf00s Quest Maker is © cloudwolf00 2010)
'You may not remove this or the above credit!
Case 0
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub

'Quest script created using cloudwolf00s Quest Maker (cloudwolf00s Quest Maker is © cloudwolf00 2010)
'You may not remove this or the above credit!
Case 1
'If the player has not started the quest, start the quest for them. This also prevents errors occuring in the script later on
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1" ) = vbNullString Then

'Start the quest for the player by setting their status to 0
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1", "0")

End If

'If the player has not started the quest yet
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1" ) = "0" Then

'The player has now started the quest - show the start quest message
text = "Drunk Dunk: I bet you's jes a stink'n newbie 'hic!'" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Am not!" & vbNewLine & vbNewLine & "Drunk Dunk: Prove it or I'll go get drunk again!" & vbNewLine & vbNewLine & GetPlayerName(Index) & " : You're already drunk." & vbNewLine & vbNewLine & "Drunk Dunk: Am not!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Whatever." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": So, how can I prove I'm not a newbie?" & vbNewLine & vbNewLine & "Drunk Dunk: Brink meh back 5 monster eyes."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

'The player started the quest - set their status to 1
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1", "1")

'If the player has started the quest and needs to attempt to finish it
ElseIf GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1" ) = "1" Then

'If the player has the needed item
If CanTake(Index, 41, 5) = True Then

'Take the needed item
Call TakeItem(Index, 41, 5)
text = "Drunk Dunk: Wha-- yer not a newbie? 'grr!' I guess I owes you this much. 'hic!'" & vbNewLine & vbNewLine & "Drunk Dunk: 'eres yer stink'n XP!" & vbNewLine & vbNewLine & "You get 100 XP!"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "")

'Give the player exp
Call SetPlayerExp(Index, GetPlayerExp(Index) + 100)
Call PlayerLevelUp(Index)
Call SendStats(Index)

Total = GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total" )
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total", Total + 1)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1", "2")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "")

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "We all hate Drunk Dunk")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2","Name17")
End If

Else

'The player does not have the item
text = "Drunk Dunk: Where's me monster eyes?!"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

End If

End If

'If the player has the needed item
If CanTake(Index, 46, 1) = True Then

'Take the needed item
Call TakeItem(Index, 46, 1)
text = "Drunk Dunk: Who're you?" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": I got you something awesome to put in your beer." & vbNewLine & vbNewLine & "Drunk Dunk: Gimme dat!" & vbNewLine & vbNewLine & "Drunk Dunk drinks the sleeping potion." & vbNewLine & vbNewLine & "Drunk Dunk: Thishh shhtuff is amashhing! 'gulp' Ahh... Shhooo is 'dere more?" & vbNewLine & vbNewLine & "You wait for a long time but Drunk Dunk doesn't fall asleep." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": I have to go see Martie."
Call CustomMenuShow(Index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest3", "3")
End If

'If the player has not started the quest, start the quest for them. This also prevents errors occuring in the script later on
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7" ) = vbNullString Then

'Start the quest for the player by setting their status to 0
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7", "0")

End If

'If the player has not started the quest yet
If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest6" ) = "3") Then

'The player has now started the quest - show the start quest message
text = "Drunk Dunk: Oh the misery of life!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Why are you so misserable?" & vbNewLine & vbNewLine & "Drunk Dunk: I lost it all. I used to be an explorer ya know." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Really?" & vbNewLine & vbNewLine & "Drunk Dunk: Had a family, every reason for living, then they all went away." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": What do you mean by went away?" & vbNewLine & vbNewLine & "Drunk Dunk: They just went away!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Are you drunk again?" & vbNewLine & vbNewLine & "Drunk Dunk: I'm alway's drunk!"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

'The player started the quest - set their status to 1
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7", "1")
End If

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) = "0") or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) = "4") Then
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "7" Then
Call GiveCurrency(Index, 59, 1)

text = GetPlayerName(Index) & ": Hand it over." & vbNewLine & vbNewLine & "Drunk Dunk: What I hand over? 'hic!'" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": The locket." & vbNewLine & vbNewLine & "Drunk Dunk: My shiney!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Aha! So you did steal it! And it's not your shiney. It belongs to the twins." & vbNewLine & vbNewLine & "Drunk Dunk: But it's my shiney!!!" & vbNewLine & vbNewLine & "You put out your hand and he grudgingly gives you the locket."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "8")
End If
End If

Exit Sub

'Quest script created using cloudwolf00s Quest Maker (cloudwolf00s Quest Maker is © cloudwolf00 2010)
'You may not remove this or the above credit!
Case 2
'If the player has not started the quest, start the quest for them. This also prevents errors occuring in the script later on
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2" ) = vbNullString Then

'Start the quest for the player by setting their status to 0
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2", "0")

End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2" ) = "0" And GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest1" ) = "2" Then

'The player has now started the quest - show the start quest message
text = "Martie: Drunk Dunk over there has been a real pain lately. Me and my customers would like it if he would be quiet more often. Please go to Ashly at the marketplace and ask for a sleeping potion, then come back here and give it to Drunk Dunk."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

'The player started the quest - set their status to 1
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2", "1")

'If the player has started the quest and needs to attempt to finish it
ElseIf GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2" ) = "1" Then

'If the player has given Drunk Dunk the potion
If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest3" ) = "3" Then

'Give the player the stackable reward item
Call GiveCurrency(Index, 1, 25)
'Give the player exp
Call SetPlayerExp(Index, GetPlayerExp(Index) + 250)
Call PlayerLevelUp(Index)
Call SendStats(Index)

text = "Martie: It didn't work? Oh well. I guess I owe you this." & vbNewLine & vbNewLine & "You get 250 XP!"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

'The player has completed the quest - set their status to 2
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2", "2")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q2" ), "")
Total = GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total" )
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total", Total + 1)

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name1", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name1")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name2", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name2")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name3", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name3")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name4", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name4")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name5", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name5")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name6", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name6")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name7", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name7")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name8", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name8")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name9", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name9")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name10", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name10")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name11", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name11")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name12", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name12")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name13", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name13")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name14", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name14")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name15", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name15")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name16", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name16")

ElseIf (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = "") Or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17" ) = vbNullString) Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Name17", "The Missing Locket")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14","Name17")
End If

Else
'The player is now doing the quest - show the during quest message
text = "Martie: Did you get that sleeping potion from Ashly?"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

End If

End If

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7" ) = "1") And Not (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = 0) And Not (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "2") And Not (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "4") And Not (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "9") And Not (text = "Martie: You seem to be a reliable help. I wouldn't mind some myself. Well, It's my twin daughters actually. You may have seen them. Their names are Ashly and Amanda and they've refused to talk to each other for three years! I don't know why and they won't tell me. Please ask them what happened three years ago and tell me.") And Not (text = "Martie: Oh, the locket. It was very special to them. It seemed to keep their mother with them. No wonder they despise each other. It's strange that their stories contridict each other. Please, try to convince them that it's neither of their faults. It must have just gotten lost.") And Not (text = "Martie: It didn't work?! Oh what am I going to do with those two?...") And Not (text = "Martie: Oh thank you so very much " & GetPlayerName(Index) & "! You deserve a handsome reward for this!" & vbNewLine & vbNewLine & "You get 500 coins and 250 XP!") Then
text = GetPlayerName(Index) & ": What's up with Drunk Dunk?" & vbNewLine & vbNewLine & "Martie: Ah, it's a sad story it is." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": He says his wife and children went away. Where'd they go?" & vbNewLine & vbNewLine & "Martie: To the next world. Him and his family were traveling through Gregory's Woods when something killed them. Loosing his wife and children drove him insane. We still don't know what happened that night." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": What do you think happened?" & vbNewLine & vbNewLine & "Martie: How should I know? The only way to find out for sure would be to go to those woods but you wouldn't live through it."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest7", "2")
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = vbNullString Then
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "0")
End If

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) = "0") or (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest10" ) = "4") Then

If (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "0") And (GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest2" ) = "2") And Not (text = "Martie: It didn't work? Oh well. I guess I owe you this." & vbNewLine & vbNewLine & "You get 250 XP!") And Not (text = "Drunk Dunk: Oh the misery of life!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Why are you so misserable?" & vbNewLine & vbNewLine & "Drunk Dunk: I lost it all. I used to be an explorer ya know." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Really?" & vbNewLine & vbNewLine & "Drunk Dunk: Had a family, every reason for living, then they all went away." & vbNewLine & vbNewLine & GetPlayerName(Index) & ": What do you mean by went away?" & vbNewLine & vbNewLine & "Drunk Dunk: They just went away!" & vbNewLine & vbNewLine & GetPlayerName(Index) & ": Are you drunk again?" & vbNewLine & vbNewLine & "Drunk Dunk: I'm alway's drunk!") Then
text = "Martie: You seem to be a reliable help. I wouldn't mind some myself. Well, It's my twin daughters actually. You may have seen them. Their names are Ashly and Amanda and they've refused to talk to each other for three years! I don't know why and they won't tell me. Please ask them what happened three years ago and tell me."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "1")
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "2" Then
text = "Martie: Oh, the locket. It was very special to them. It seemed to keep their mother with them. No wonder they despise each other. It's strange that their stories contridict each other. Please, try to convince them that it's neither of their faults. It must have just gotten lost."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "3")
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "4" Then
text = "Martie: It didn't work?! Oh what am I going to do with those two?..."
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "5")
End If

If GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14" ) = "9" Then
text = "Martie: Oh thank you so very much " & GetPlayerName(Index) & "! You deserve a handsome reward for this!" & vbNewLine & vbNewLine & "You get 500 coins and 250 XP!"
Call CustomMenuShow(index, "Speech", "\GUI\Quest.bmp", 1)
Call CustomMenuLabel(Index, 0, text, 0, 0, 8, 1, 0, 286, 315)

Call GiveCurrency(Index, 1, 500)
Call SetPlayerExp(Index, GetPlayerExp(Index) + 250)
Call PlayerLevelUp(Index)
Call SendStats(Index)
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Quest14", "10")
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Q14" ), "")
Total = GetVar( "Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total" )
Call PutVar("Scripts\Quests\" & GetPlayerName(Index) & ".ini", "Quests", "Total", Total + 1)
End If

End If
Exit Sub
```
etc… it ran out of room
Link to comment
Share on other sites

ScriptedTile:
```
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Module: ScriptedTile.ess '
' Author: Stephan J.R. van Schaik '
' Date: August 30th, 2009. '
' Version: 1.0.0 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: ScriptedTile '
' Brief: executes when somebody steps on the tile. '
' Parameters: '
' Index: the index of the player. '
' Script: the script to execute. '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub ScriptedTile(Index, Script)
Select Case Script
Case 0
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Mining", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Fishing", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Farming", "0")

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Crafting", "0")
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking", "0")

Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Necromancy", "0")
Exit Sub

Case 1
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smelting", "1")
Call PlayerMsg(Index, "You enter a smelting area.", WHITE)
Exit Sub

Case 2
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Smithing", "1")
Call PlayerMsg(Index, "You enter a smithing area.", WHITE)
Exit Sub

Case 3
Call PutVar("Scripts\Skills\" & GetPlayerName(Index) & ".ini", "Triggers", "Cooking", "1")
Call PlayerMsg(Index, "You enter a cooking area.", WHITE)
Exit Sub

Case Else
Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE)

Exit Sub
End Select
End Sub

```

So yeah. As you can see, this was a lot of work, and aside from using cloudwolf's quest maker in part, I did this all by myself. I'd hate to see it all go to waste so if anyone can give me some tips or point me in the right direction I would be very grateful.
Link to comment
Share on other sites

@ImmortalDreams:

> I did this all by myself. I'd hate to see it all go to waste so if anyone can give me some tips or point me in the right direction I would be very grateful.

Then you shouldn't have spent the last 3 years working with an engine which was decommissioned.
Link to comment
Share on other sites

What do you expect? Stable and Evolution being removed from the forum had nothing to do with me being insistent on blocking them.

It's impossible for you to get any help for them because no one here knows how to help you. You've spent the last 3 years working with a project which no one else understands. That, my friend, makes you the leading authority on Stable.

As for your question, I assume you already know the answer considering you know Stable better than anyone else. You scripted those features in to Stable. If you want them in Origins then you'll need to program them in to Origins.
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...