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

shredder8910

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

shredder8910's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Every time i start up Eclipse Origins I get this error ``` Run-time error '2005401480 (88780078)' Automation Error ```Anyone Know why?? Edit:BTW im running Windows 7 Enterprise 64-Bit on a 2.66GHz CPU w/ 4gb of Ram installed
  2. I know backup the files you want and then re-download Eclipse Evolution
  3. ``` TYPE: Type Mismatch: '[string '''']' LINE:9 COLUMN:0 CODE: ``` I get this error everytime i use a hotkey for a Mount from Flying Steeds with Scrolls [3/5] ``` TYPE: Type Mismatch: '[string '''']' LINE:11 COLUMN:0 CODE: ``` I get this error everytime i use a hotkey for a Mount from Flying Steeds with Scrolls [2/5]
  4. ``` ' Eclipse Evolution 2.7 Scripting File ' Global Variables Public GameName Public MAX_MAPS Public MOTD ' Color Constants Public Const BLACK = 0 Public Const BLUE = 1 Public Const GREEN = 2 Public Const CYAN = 3 Public Const RED = 4 Public Const MAGENTA = 5 Public Const BROWN = 6 Public Const GREY = 7 Public Const DARKGREY = 8 Public Const BRIGHTBLUE = 9 Public Const BRIGHTGREEN = 10 Public Const BRIGHTCYAN = 11 Public Const BRIGHTRED = 12 Public Const PINK = 13 Public Const YELLOW = 14 Public Const WHITE = 15 ' Admin Constants Public Const ADMIN_MONITER = 1 Public Const ADMIN_MAPPER = 2 Public Const ADMIN_DEVELOPER = 3 Public Const ADMIN_CREATOR = 4 ' Executes when the server initially loads. Sub OnServerLoad() GameName = GetVar("Data.ini", "CONFIG", "GameName") MAX_MAPS = GetVar("Data.ini", "MAX", "MAX_MAPS") MOTD = GetVar("MOTD.ini", "MOTD", "Msg") End Sub ' Executes when the scripts are reloaded. Sub OnScriptReload() GameName = GetVar("Data.ini", "CONFIG", "GameName") MAX_MAPS = GetVar("Data.ini", "MAX", "MAX_MAPS") MOTD = GetVar("MOTD.ini", "MOTD", "Msg") End Sub ' Executes the MOTD is changed by the client. Sub ChangeMOTD() MOTD = GetVar("MOTD.ini", "MOTD", "Msg") End Sub ' Executes when a new character is created. Sub OnNewChar(Index, CharNum) End Sub ' Executes when a new character is created. Sub OnNewChar(Index, CharNum) Call putvar(getplayername(index) & ".ini", "QUEST", "quest1",0) End Sub ' Executes every second, based on the server time. Sub TimedEvent(Hours, Minutes, Seconds) If Minutes = 0 Then If Seconds = 0 Then Call AdminMsg("Don't forget to vote for Eclipse.", YELLOW) End If End If End Sub ' Executes when a player presses the CONTROL key. Sub OnAttack(Index, Damage) Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) End If End If End Sub Call CastCheck(index) Sub OnArrowHit(Index, Damage) Dim Target If Int(Damage) > 0 Then If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage) End If End If End Sub Sub PlayerHit(Index, NPCNum, Damage) If Damage > 0 then Call NPCAttack(NPCNum, Index, Damage) End If End Sub ' Executes when a hotkey is pressed client-side. Sub HotScript(Index, KeyID) Select Case KeyID ' Executes when any player presses the PageUp key. Case 1 ' Executes when any player presses the Delete key. Case 2 ' Executes when players press the End key. Case 3 ' Executes when players press the PageDown key. Case 4 Call CustomMenuClose(Index) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\QUEST LOG\Background.gif", 1) ' To make sure the right column have correct y position If POSy = 323 Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Posy", 3) 'End If ' Accepted quest 1, place quest in left column if need be - store location ElseIf POS < 11 And Quest1 = 1 And QuestLog1 = 0 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice.GIF", 3, POSy) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore1", (POSy)) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog1", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex1", 3) POSvarx = POS + 1 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS", (POSvarx)) POSvary = POSy + 32 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy", (POSvary)) ' Accepted quest 1, place quest in right column if need be - store its location ElseIf POS > 10 And Quest1 = 1 And QuestLog1 = 0 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice.GIF", 203, POSy) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore1", (POSy)) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex1", 203) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog1", 1) POSvarx = POS + 1 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS", (POSvarx)) POSvary = POSy + 32 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy", (POSvary)) ' Call up stored location of quest 1 in left column ElseIf POS < 11 And Quest1 = 1 And QuestLog1 = 1 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice.GIF", Qstorex1, Qstore1) ' Call up stored location in right column for quest 1 ElseIf POS > 10 And Quest1 = 1 And QuestLog1 = 1 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice.GIF", Qstorex1, Qstore1) 'Call The Second justice graphic when quest 1 = 2 and put in left column if need be ElseIf POS < 11 And Quest1 = 2 And QuestLog1 = 1 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice2.GIF", Qstorex1, Qstore1) 'Call The Second justice graphic when quest 1 = 2 and put in right column if need be ElseIf POS > 10 And Quest1 = 2 And QuestLog1 = 1 Then Call CustomMenuPicture(Index, 19, "\GUI\CUSTOM\QUEST LOG\Justice2.GIF", Qstorex1, Qstore1) End If ' The same as quest 1, but for quest 2 If POS < 11 And Quest2 = 1 And QuestLog2 = 0 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney.GIF", 3, POSy) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore2", (POSy)) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex2", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog2", 1) POSvarx = POS + 1 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS", (POSvarx)) POSvary = POSy + 32 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy", (POSvary)) ElseIf POS > 10 And Quest2 = 1 And QuestLog2 = 0 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney.GIF", 203, POSy) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore2", (POSy)) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex2", 203) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog2", 1) POSvarx = POS + 1 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS", (POSvarx)) POSvary = POSy + 32 Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy", (POSvary)) ElseIf POS < 11 And Quest2 = 1 And QuestLog2 = 1 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney.GIF", Qstorex2, Qstore2) ElseIf POS < 11 And Quest2 = 2 And QuestLog2 = 1 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney2.GIF", Qstorex2, Qstore2) ElseIf POS > 10 And Quest2 = 2 And QuestLog2 = 1 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney2.GIF", Qstorex2, Qstore2) ElseIf POS > 10 And Quest2 = 1 And QuestLog2 = 1 Then Call CustomMenuPicture(Index, 20, "\GUI\CUSTOM\QUEST LOG\bloodmoney.GIF", Qstorex2, Qstore2) End If End Select End Sub ' Declare variables for easy use Dim POS, Qstorex1, Qstorex2, Qstore1, Qstore2, QuestLog1, POSy, QuestLog2, QuestLog3, QuestLog4, QuestLog5, QuestLog6, QuestLog7, QuestLog8, QuestLog9, QuestLog10, QuestLog11, Quest1, Quest2, Quest3, Quest4, Quest5, Quest6, Quest7, Quest8, Quest9, Quest10, Quest11 POSy = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy") POS = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS") QuestLog1 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog1") QuestLog2 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog2") QuestLog3 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog3") QuestLog4 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog4") QuestLog5 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog5") QuestLog6 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog6") QuestLog7 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog7") QuestLog8 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog8") QuestLog9 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog9") QuestLog10 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog10") QuestLog11 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog11") Quest1 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") Quest2 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest2") Quest3 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest3") Quest4 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest4") Quest5 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest5") Quest6 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6") Quest7 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest7") Quest8 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest8") Quest9 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest9") Quest10 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest10") Quest11 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest11") Qstore1 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore1") Qstore2 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore2") Qstorex2 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex2") Qstorex1 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex1") ' Executes when something on a custom menu is clicked. Sub MenuScripts(Index, Clicked_Index, Menu_Type) Dim MenuTitle Dim FieldMessage MenuTitle = getplayermenuclicktitle(Index) FieldMessage = getplayermenuclickmsg(Index) Quest1 = GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") Select Case Menu_Type Case 1 Call PlayerMsg(Index, "Clicked picture number " & Clicked_Index & " on the menu named " & MenuTitle, YELLOW) Case 2 Call PlayerMsg(Index, "Clicked field number " & Clicked_Index & " on the menu named " & MenuTitle & ". The field text was " & FieldMessage, YELLOW) Case 3 Call PlayerMsg(Index, "Clicked label number " & Clicked_Index & " on the menu named " & MenuTitle, YELLOW) End Select If Clicked_Index = 19 Then If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") = 1 Then Call PlayerMsg(Index, "Crios' wife was killed. Find the killer and bring his head back to Crios in Traviol. The killer was seen heading towards the docks.", YELLOW) ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") = 2 Then Call PlayerMsg(Index, "Crios sleeps better at night, knowing justice was done.", GREEN) End If End If If Clicked_Index = 51 And Quest1 = 0 Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1", 1) Call CustomMenuClose(Index) Call HotScript(Index, 4) Call CustomMenuClose(Index) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\QUEST LOG\Qbackground.gif", 1) Call CustomMenuLabel(Index, 70, "Splendid! Bring his head to me; I will recognize his face for it is forever edged into my memory. I do not have much, but what I have, I'll give you along with my thanks. I saw him heading East. Now go!", 3, 3, 8, 0, 0, 190, 200) End If If Clicked_Index = 55 And Quest1 = 1 Then Call CustomMenuClose(Index) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\QUEST LOG\Qbackground.gif", 1) Call CustomMenuLabel(Index, 72, "Then why are you still here?", 3, 3, 8, 0, 0, 190, 200) End If If Clicked_Index = 54 And Quest1 = 1 Then Call CustomMenuClose(Index) Call quest12(index) End If If Clicked_Index = 52 And Quest1 = 0 Then Call CustomMenuClose(Index) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\QUEST LOG\Qbackground.gif", 1) Call CustomMenuLabel(Index, 73, "Come back when you have changed your mind.", 3, 3, 8, 0, 0, 190, 200) End If If Clicked_Index = 20 Then If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest2") = 1 Then Call PlayerMsg(Index, "Priest Vilmar needs 5 human hearts for his enchantment.", YELLOW) ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest2") = 2 Then Call PlayerMsg(Index, "You gave the hearts to the priest.", GREEN) End If End If End Sub Dim quest1 ' Executes when a player logs into the game. Sub JoinGame(Index) If GetPlayerAccess(Index) = 0 Then Call GlobalMsg(GetPlayerName(Index) & " has joined " & GameName & "!", GREY) Else Call GlobalMsg("Administrator " & GetPlayerName(Index) & " has joined " & GameName & "!", YELLOW) End If Call PlayerMsg(Index, "Welcome to " & GameName & "!", WHITE) If LenB(MOTD) 0 Then Call PlayerMsg(Index, "MOTD: " & MOTD, BRIGHTCYAN) End If Call SendWhosOnline(Index) End Sub If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") = "" Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest2", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest3", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest4", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest5", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest7", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest8", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest9", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest10", 0) Call Putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest11", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog1", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog2", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog3", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog4", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog5", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog6", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog7", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog8", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog9", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog10", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QuestLog11", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POS", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "POSy", 3) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore1", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore2", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore3", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore4", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore5", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore6", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore7", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore8", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore9", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore10", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstore11", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex1", 0) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Qstorex2", 0) End If If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1") = "" Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag1", 0) End If If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2") = "" Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag2", 0) End If If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag3") = "" Then Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Flag3", 0) End If ' Executes when a player logs out of the game. Sub LeftGame(Index) If GetPlayerAccess(Index) = 0 Then Call GlobalMsg(GetPlayerName(Index) & " has left " & GameName & "!", GREY) Else Call GlobalMsg("Administrator " & GetPlayerName(Index) & " has left " & GameName & "!", YELLOW) End If End Sub ' Executes when a players experience exceeds the next level requirement. Sub PlayerLevelUp(Index) Dim TotalExp Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index) TotalExp = GetPlayerExp(Index) - GetPlayerNextLevel(Index) Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1) Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1) Call SetPlayerExp(Index, TotalExp) Loop Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, 0) End Sub ' Executes when a player uses one of the points given on an attribute to level up. Sub UsingStatPoints(Index, PointType) Select Case PointType Case 0 If GetPlayerSTR(Index) + 1 > 1000 Then Call BattleMsg(Index, "You have maxed your strength!", BRIGHTRED, 0) Exit Sub End If Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 1) Call BattleMsg(Index, "You have gained more strength!", WHITE, 0) Case 1 If GetPlayerDEF(Index) + 1 > 1000 Then Call BattleMsg(Index, "You have maxed your defence!", BRIGHTRED, 0) Exit Sub End If Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 1) Call BattleMsg(Index, "You have gained more defense!", WHITE, 0) Case 2 If GetPlayerMAGI(Index) + 1 > 1000 Then Call BattleMsg(Index, "You have maxed your magic!", BRIGHTRED, 0) Exit Sub End If Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 1) Call BattleMsg(Index, "You have gained more magic!", WHITE, 0) Case 3 If GetPlayerSPEED(Index) + 1 > 1000 Then Call BattleMsg(Index, "You have maxed your speed!", BRIGHTRED, 0) Exit Sub End If Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 1) Call BattleMsg(Index, "You have gained more speed!", WHITE, 0) End Select ' Remove one point after the sub in question is done Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) - 1) End Sub ' Executes when a player steps onto a scripted tile. Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted tile has no apparent use.", 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 Case 2 '########## RING QUEST ########### If getvar(getplayername(index) & ".ini", "QUEST", "quest1") = 0 Then Call PlayerMsg(index, "I'm the Gate Keeper, can you buy me Zorgon's Ring from the store?", 12) If CanTake(Index, 4, 1) = false then Call PlayerMsg(index, "Better Hurry Now !!", 12) Else Then Call TakeItem(index, 4, 1) Call GiveItem(index, 4, 100) Call PlayerMsg(index, "Well done your Quest has been accomplished", 12) Call SetPlayerHP(index, GetPlayerHP(index) + 8) Call SetPlayerExp(index, GetPlayerExp(index) + 10) Call SendStats(index) Call PlayerMsg(index, "I've increased your HP and Exp", 15) Call putvar(getplayername(index) & ".ini", "QUEST", "quest1", 1) End If Else Then Call PlayerMsg(index, "Sorry this quest has been completed", 12) End If Exit Sub ' Executes when a player clicks on an OnClick tile. Sub OnClick(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted tile has no apparent use.", 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 ' Out-dated: Executes when a player chooses yes or no on a player prompt. Sub PlayerPrompt(Index, Prompt, Value) If Prompt = 6 Then Select Case Value Case 0 Call Quest(Index, GetVar("/scripts/charextras" & GetPlayerName(Index) & ".ini", "Quest", "Prompting")) Exit Sub End Select Else Select Case Value Case 0 Exit Sub End Select End If End Sub ' Out-dated: Executes query box responses. Sub QueryBox(Index, Prompt) Value = GetVar("responses.ini", "Responses", CStr(Index)) End Sub ' Executes every time a player drops an item. Sub OnItemDrop(Index, Map, ItemNum, ItemVal, ItemDur, ItemIndex, InvSlot) End Sub ' Executes each time a player changes map. Sub OnMapLoad(Index, OldMap, NewMap) End Sub ' Executes whenever an NPC is killed. ' Note: Death occurs as normal externally to this script. Sub OnNPCDeath(Index, Map, NPCNum, NPCIndex) Call BattleMsg(Index, "You killed a " & getnpcname(NPCNum) & ".", BRIGHTRED, 0) End Sub If NPCNum = 3 Then If GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "Status") = 1 Then If GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain") >= GetVar("/scripts/quests/1.ini", "Info", "NpcsToSlay") Then If GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "SlayTask") = 1 If GetVar("/scripts/quests/1.ini", "SlayNPC" & Int(GetVar("/scripts/quests/quest1.ini" & GetPlayerName(Index) & ".ini", "SlayNPC" & Int(GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain") + 1), "NPCsSlain") + 1), "NPCAmmount") = Int(GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPC" & Int(GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain") + 1) & " Slain")+1) Then Call PutVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain", Int(GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain")+1)) Else Then Call PutVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPC" & Int(GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest1", "NPCsSlain") + 1) & " Slain") End If End If End If End If End If ' Executes when a player is killed by another. ' Note: Death occurs as normal externally to this script. Sub OnPVPDeath(Attacker, Victim) Call GlobalMsg(GetPlayerName(Victim) & " has been killed by " & GetPlayerName(Attacker), BRIGHTRED) End Sub ' Executes when a player dies in an arena by another player. Sub OnArenaDeath(Attacker, Victim) Dim Map Dim X Dim Y Dim Data1 Dim Data2 Dim Data3 Map = GetPlayerMap(Victim) X = GetPlayerX(Victim) Y = GetPlayerY(Victim) Call GlobalMsg(GetPlayerName(Victim) & " has been defeated in the arena by " & GetPlayerName(Attacker), BRIGHTRED) Call SetPlayerHP(Victim, GetPlayerMaXHP(Victim)) Call SetPlayerMP(Victim, GetPlayerMaXMP(Victim)) Call sendHp(Victim) Call sendMP(Victim) Data1 = GetTileData1(Map, X, Y) Data2 = GetTileData2(Map, X, Y) Data3 = GetTileData3(Map, X, Y) Call PlayerWarp(Victim, Data1, Data2, Data3) End Sub ' Executes whenever a player casts a scripted spell. Sub ScriptedSpell(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted spell has no apparent use.", WHITE) Exit Sub Case Else Call PlayerMsg(Index, "No spell script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End Select End Sub ' Executes whenever a scripted NPC does an action. Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE) Exit Sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End Select End Sub Case 0 Call Quest(Index, 1) Exit Sub Case 3 Call CustomMenuClose(Index) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\QUEST LOG\Qbackground.gif", 1) If GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") = 0 Then Call CustomMenuLabel(Index, 50, "You look like someone cabable ofhelping an old man. You see: Someone broke into my house last night. He demanded all my posessions, but I resisted and then he killed my wife in front of me. I need justice. Will you help me to revenge my wife's death?", 3, 3, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, 51, "I'll make him pay!", 3, 260, 8, 5, 0, 200, 15) Call CustomMenuLabel(Index, 52, "Sorry, I can't help you.", 3, 280, 8, 5, 0, 200, 15) ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest1") = 1 Then Call CustomMenuLabel(Index, 53, "Have you brought me the killer's head?", 3, 3, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, 54, "Yes, I have.", 3, 260, 8, 5, 0, 200, 15) Call CustomMenuLabel(Index, 55, "No, Not Yet.", 3, 280, 8, 5, 0, 200, 15) End If ' Executed whenever a slash command is sent to the server. Sub Commands(Index) Dim TextSay Dim PlayerID Dim MapNum ' Get the command and arguments from the cache. TextSay = Trim(GetVar("Scripts\Command.ini", "TEMP", "Text" & Index)) ' Split the command into an array. All arguments are seperated by spaces. TextSay = Split(TextSay) Select Case TextSay(0) Case "/testscripts" Call TestMain(Index) Exit Sub Case "/help" Call PlayerMsg(Index, "Social Commands:", WHITE) Call PlayerMsg(Index, "'msghere = Broadcast Message", WHITE) Call PlayerMsg(Index, "-msghere = Emote Message", WHITE) Call PlayerMsg(Index, "!namehere msghere = Player Message", WHITE) Call PlayerMsg(Index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", WHITE) Exit Sub Case "/calladmins" If GetPlayerAccess(Index) = 0 Then Call AdminMsg(GetPlayerName(Index) & " needs your help!", BRIGHTGREEN) Else Call PlayerMsg(Index, "You are an admin! You cannot call for help!", BRIGHTGREEN) End If Exit Sub Case "/admin" If GetPlayerAccess(Index) > 0 Then Call PlayerMsg(Index, "Social Commands:", WHITE) Call PlayerMsg(Index, """msghere = Global Admin Message", WHITE) Call PlayerMsg(Index, "=msghere = Private Admin Message", WHITE) Call PlayerMsg(Index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", WHITE) End If Exit Sub Case "/warpmeto" If GetPlayerAccess(Index) > 0 Then PlayerID = FindPlayer(TextSay(1)) If PlayerID > 0 Then Call PlayerWarp(Index, GetPlayerMap(PlayerID), GetPlayerX(PlayerID), GetPlayerY(PlayerID)) Call PlayerMsg(Index, "You have been warped to " & GetPlayerName(PlayerID) & ".", BROWN) Else Call PlayerMsg(Index, "Player is not online.", WHITE) End If End If Exit Sub Case "/warptome" If GetPlayerAccess(Index) > 0 Then PlayerID = FindPlayer(TextSay(1)) If PlayerID > 0 Then Call PlayerWarp(PlayerID, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)) Call PlayerMsg(PlayerID, "You have been warped to " & GetPlayerName(Index) & ".", BROWN) Else Call PlayerMsg(Index, "Player is not online.", WHITE) End If End If Exit Sub Case "/warpto" If GetPlayerAccess(Index) > 0 Then MapNum = TextSay(1) If MapNum > 0 And MapNum 5 Then TextSay = Mid(TextSay, 5, Len(TextSay) - 4) n = TextSay friends = 1 do while friends < 20 if "" & GetVar(GetPlayerLogin(index) & ".ini", "FRIENDS", "friend" & friend) = "" then call putVar(GetPlayerLogin(index) & ".ini", "FRIENDS", "friend" & friend, n) call playermsg(index, n & "was added to your friendlist.", 2) exit sub else friends = friends + 1 end if loop call playermsg(index, "you don't have any room left in your friendlist", 1) End If Exit Sub End If If LCase(Mid(TextSay, 1, 5)) = "/dell" Then If Len(TextSay) > 6 Then TextSay = Mid(TextSay, 6, Len(TextSay) - 5) n = TextSay friends = 1 do while friends < 20 if "" & GetVar(GetPlayerLogin(index) & ".ini", "FRIENDS", "friend" & friend) = n then call putVar(GetPlayerLogin(index) & ".ini", "FRIENDS", "friend" & friend, "") call playermsg(index, n & "was deleted to your friendlist.", 2) exit sub else friends = friends + 1 end if loop call playermsg(index, "you don't have this person in your friendlist", 1) End If Exit Sub End If Call PlayerMsg(Index, "That Command is Unavialable.", BRIGHTRED) End Sub Case "/questlog" Dim DescLine Dim Desc Dim Y Dim Header Dim QuestStatus Dim Color QuestStatus = GetVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest" & GetVar("/scripts/quests/quests.ini", "QuestNumbers", TextSay(1)), "Status") If QuestStatus = "" Or 0 Then QuestStatus = "Not started" Color = BRIGHTRED ElseIf QuestStatus = 1 Then QuestStatus = "Active" Color = YELLOW ElseIf QuestStatus = 2 Then QuestStatus = "Complete" Color = BRIGHTGREEN End If Header = GetVar("/scripts/quests/quests.ini", "QuestNames", TextSay(1)) Call CustomMenuShow(Index, "Quest Log", "\GUI\CUSTOM\Questlog.jpg", 1) Call CustomMenuLabel(Index, 1, Header, 200, 50, 15, 0, 0, 400, 20) DescLine = 1 Y = 100 Do While DescLine 0 Then Call PlayerMapDropItem(Index, GetPlayerArmorSlot(Index), 0) End If If GetPlayerHelmetSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerHelmetSlot(Index), 0) End If If GetPlayerShieldSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerShieldSlot(Index), 0) End If If GetPlayerLegsSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerLegsSlot(Index), 0) End If If GetPlayerRingSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerRingSlot(Index), 0) End If If GetPlayerNecklaceSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerNecklaceSlot(Index), 0) End If End Sub ' Executes whenever somebody dies outside of an arena. Sub OnDeath(Index) Dim MapNum Dim ClassID Dim X Dim Y If GetMapBootMap(Index) > 0 Then Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index)) Else ClassID = GetPlayerClass(Index) MapNum = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "Map") X = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "x") Y = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "y") Call PlayerWarp(Index, MapNum, X, Y) End If End Sub ' Executes whenever a scripted item is used or double clicked. Sub ScriptedItem(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted item has no apparent use.", WHITE) Exit Sub Case Else Call PlayerMsg(Index, "No item script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End Select End Sub ' Map Attributes Sub SetBlank(Map, X, Y) Call SetAttribute(Map, X, Y, 0, 0, 0, 0, "", "", "") End Sub Sub SetBlock(Map, X, Y) Call SetAttribute(Map, X, Y, 1, 0, 0, 0, "", "", "") End Sub Sub SetWarp(Map, X, Y, WarpMap, WarpX, WarpY) Call SetAttribute(Map, X, Y, 2, WarpMap, WarpX, WarpY, "", "", "") End Sub Sub SetItem(Map, X, Y, ItemID, ItemValue) Call SetAttribute(Map, X, Y, 3, ItemID, ItemValue, 0, "", "", "") End Sub Sub SetNPCAvoid(Map, X, Y) Call SetAttribute(Map, X, Y, 4, 0, 0, 0, "", "", "") End Sub Sub SetKeY(Map, X, Y, KeyID, KeyTake) Call SetAttribute(Map, X, Y, 5, KeyID, KeyTake, 0, "", "", "") End Sub Sub SetKeYOpen(Map, X, Y, KeyX, KeyY, Message) Call SetAttribute(Map, X, Y, 6, KeyX, KeyY, 0, Message, "", "") End Sub Sub SetHeal(Map, X, Y) Call SetAttribute(Map, X, Y, 7, 0, 0, 0, "", "", "") End Sub Sub SetKill(Map, X, Y) Call SetAttribute(Map, X, Y, 8, 0, 0, 0, "", "", "") End Sub Sub SetShop(Map, X, Y, ShopID) Call SetAttribute(Map, X, Y, 9, ShopID, 0, 0, "", "", "") End Sub Sub SetClassBlock(Map, X, Y, Allow1, Allow2, Allow3) Call SetAttribute(Map, X, Y, 10, Allow, Allow2, Allow3, "", "", "") End Sub Sub SetArena(Map, X, Y, MapID, NewX, NewY) Call SetAttribute(Map, X, Y, 11, MapID, NewX, NewY, "", "", "") End Sub Sub SetSound(Map, X, Y, FileName) Call SetAttribute(Map, X, Y, 12, 0, 0, 0, FileName, "", "") End Sub Sub SetSpriteChange(Map, X, Y, SpriteID, ItemID, Cost) Call SetAttribute(Map, X, Y, 13, SpriteID, ItemID, Cost, "", "", "") End Sub Sub SetSign(Map, X, Y, Line1, Line2, Line3) Call SetAttribute(Map, X, Y, 14, 0, 0, 0, Line1, Line2, Line3) End Sub Sub SetDoor(Map, X, Y) Call SetAttribute(Map, X, Y, 15, 0, 0, 0, "", "", "") End Sub Sub SetNotice(Map, X, Y, Title, Text, FileName) Call SetAttribute(Map, X, Y, 16, 0, 0, 0, Title, Text, FileName) End Sub Sub SetScripted(Map, X, Y, Script) Call SetAttribute(Map, X, Y, 18, Script, 0, 0, "", "", "") End Sub Sub SetBank(Map, X, Y) Call SetAttribute(Map, X, Y, 23, 0, 0, 0, "", "", "") End Sub ' Tests scripts up to the location of Sub TestMain(Index). ' Leave this sub at the bottom to test the entire script file. Sub TestMain(Index) Call PlayerMsg(Index, "Scripts are working properly.", BRIGHTGREEN) End Sub Function GetFreeSlots(Index) Dim Slot Dim Slots Slot = 1 Slots = 0 Index = Int(Index) Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = 0 Then Slots = Slots + 1 End If Slot = Slot + 1 Loop GetFreeSlots = Slots End Function Sub GiveItem(Index, Number, Durability) Dim Slot Slot = 1 Index = Int(Index) Number = Int(Number) Durability = Int(Durability) Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = 0 Then Call SetPlayerInvItemNum(Index, Slot, Number) Call SetPlayerInvItemDur(Index, Slot, Durability) Call SendInventoryUpdate(Index, Slot) Exit Sub End If Slot = Slot + 1 Loop End Sub Sub GiveCurrency(Index, Number, Amount) Dim Slot Dim CurrentAmount Slot = 1 Index = Int(Index) Number = Int(Number) Amount = Int(Amount) Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = Number Then CurrentAmount = GetPlayerInvItemValue(Index, Slot) Call SetPlayerInvItemValue(Index, Slot, CurrentAmount + Amount) Call SendInventoryUpdate(Index, Slot) Exit Sub End If Slot = Slot + 1 Loop Slot = 1 Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = 0 Then Call SetPlayerInvItemNum(Index, Slot, Number) Call SetPlayerInvItemValue(Index, Slot, Amount) Call SendInventoryUpdate(Index, Slot) Exit Sub End If Slot = Slot + 1 Loop End Sub Function CanTake(Index, Number, Amount) Dim Slot Slot = 1 Index = Int(Index) Number = Int(Number) Amount = Int(Amount) Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = Number Then If GetPlayerInvItemValue(Index, Slot) >= Amount Then CanTake = True Exit Function End If End If Slot = Slot + 1 Loop CanTake = False End Function Sub TakeItem(Index, Number, Amount) Dim Slot Dim CurrentAmount Index = Int(Index) Number = Int(Number) Amount = Int(Amount) Slot = 1 Do While Slot < 25 If GetPlayerInvItemNum(Index, Slot) = Number Then If GetPlayerInvItemValue(Index, Slot) >= Amount Then CurrentAmount = GetPlayerInvItemValue(Index, Slot) If CurrentAmount = ReqStr Then If GetPlayerDef(Index) >= ReqDef Then If GetPlayerSpeed(Index) >= ReqSpeed Then If GetPlayerMagi(Index) >= ReqMagi Then If GetPlayerLevel(Index) >= ReqLevel Then Call PutVar("/scripts/charextras/" & GetPlayerName(Index) & ".ini", "Quest", "Prompting", QuestNumber) Call Prompt(Index, "Would you like to start" & QuestName & "?", 0) Else Call PlayerMsg(Index, "You need to be at least level " & ReqLevel & " to start this quest.", BrightRed) Else Call PlayerMsg(Index, "You need to have at least " & ReqMagi & " magic to start this quest.", BrightRed) Else Call PlayerMsg(Index, "You need to have at least " & ReqSpeed & " speed to start this quest.", BrightRed) Else Call PlayerMsg(Index, "You need to have at least " & ReqDef & " defense to start this quest.", BrightRed) Else Call PlayerMsg(Index, "You need to have at least " & ReqStr & " strenght to start this quest.", BrightRed) ElseIf QuestStatus = 1 Then Dim SlayNPCs Dim QuestReqItems Dim SpeakNPCs Dim SlainNPCs Dim GivenItems Dim SpokenToNPCs SlayNPCs = GetVar("/scripts/quests/" & QuestNumber & ".ini", "Info", "NpcsToSlay") QuestReqItems = GetVar("/scripts/quests/" & QuestNumber & ".ini", "Info", "ItemsTotal") SpeakNPCs = GetVar("/scripts/quests/" & [/ ```
  5. Hey here is how to fix it. I figured out that in server folder ther is a file that says data.ini change max map to what you desire! That fixes it!
×
×
  • Create New...