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

DarkMazer

Members
  • Posts

    107
  • Joined

  • Last visited

    Never

DarkMazer's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Each increase (4-8, 8-16) is doubling speed, so yeah, it's pretty significant. I used speed increases/decreases for consumable items and short-duration spells on my game, since I don't see it being very fair to give some people a permanent significant speed advantage. Other uses for speed could be special tiles/terrain (slow going on rough ground/tall grass, maybe antigrav fields that make you move really fast) or maybe as a gimmick in a special boss fight or something. There's plenty of uses for it, if you're creative. It'd be cool to have players that were slightly faster or slower than other players but not in a significant way, but that'd require source editing.
  2. Walk and run speeds can only be powers of 2. So they can only be 1, 2, 4, 8, 16, 32, and maybe 64. It'd be nice if there were intermediates, but there aren't.
  3. ``` Sub QueryBox(index, Prompt) Value = GetVar("responses.ini","Responses",Cstr(index)) If Prompt = 0 Then Call playermsg(index, "lol", 12) End If End Sub End Sub ```Delete the second End Sub. ``` If GetVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) ".ini", "EXTRAS", "DOUBLEEXP") = "1" Then Call SetPlayerExp(Index, GetPlayerExp(Index) + GetNpcExp(NPCNum)) End If End Sub ```Replace with: ``` If GetVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "EXTRAS", "DOUBLEEXP") = "1" Then Call SetPlayerExp(Index, GetPlayerExp(Index) + GetNpcExp(NPCNum)) End If End Sub ``` ``` Case 3 Call PutVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) ".ini", "EXTRAS", "DOUBLEEXP", "1") Call PlayerMsg(Index, "For the next hour, you will have double-EXP", WHITE) Call PlayerMsg(Index, "Please do not logout, or the item's effect will stop early", WHITE) Call SetTimer("RemoveExp " & Index, 3600000) Call TakeItem(Index, 81, 1) Exit Sub ```Replace with: ``` Case 3 Call PutVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "EXTRAS", "DOUBLEEXP", "1") Call PlayerMsg(Index, "For the next hour, you will have double-EXP", WHITE) Call PlayerMsg(Index, "Please do not logout, or the item's effect will stop early", WHITE) Call SetTimer("RemoveExp " & Index, 3600000) Call TakeItem(Index, 81, 1) Exit Sub ``` ``` Case Else Exit Sub End Sub ```Replace with: ``` Case Else Exit Sub End Select End Sub ``` ``` Sub RemoveExp(Index) Call PutVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) ".ini", "EXTRAS", "DOUBLEEXP", "0") Call RemoveTimer("RemoveExp " & Index) End Sub ```Replace with: ``` Sub RemoveExp(Index) Call PutVar("Accounts\" & GetPlayerLogin(Index) & "\" & GetPlayerName(Index) & ".ini", "EXTRAS", "DOUBLEEXP", "0") Call RemoveTimer("RemoveExp " & Index) End Sub ``` That should be all the syntax problems.
  4. SetAttribute(map, x, y, attribute, data1, data2, data3, string1, string2, string3) map, x, y: obvious attributes (from source): ``` Public Const TILE_TYPE_WALKABLE = 0 Public Const TILE_TYPE_BLOCKED = 1 Public Const TILE_TYPE_WARP = 2 Public Const TILE_TYPE_ITEM = 3 Public Const TILE_TYPE_NPCAVOID = 4 Public Const TILE_TYPE_KEY = 5 Public Const TILE_TYPE_KEYOPEN = 6 Public Const TILE_TYPE_HEAL = 7 Public Const TILE_TYPE_KILL = 8 Public Const TILE_TYPE_SHOP = 9 Public Const TILE_TYPE_CBLOCK = 10 Public Const TILE_TYPE_ARENA = 11 Public Const TILE_TYPE_SOUND = 12 Public Const TILE_TYPE_SPRITE_CHANGE = 13 Public Const TILE_TYPE_SIGN = 14 Public Const TILE_TYPE_DOOR = 15 Public Const TILE_TYPE_NOTICE = 16 Public Const TILE_TYPE_CHEST = 17 Public Const TILE_TYPE_CLASS_CHANGE = 18 Public Const TILE_TYPE_SCRIPTED = 19 'Public Const TILE_TYPE_NPC_SPAWN = 20 Public Const TILE_TYPE_HOUSE = 21 'Public Const TILE_TYPE_CANON = 22 Public Const TILE_TYPE_BANK = 23 'Public Const TILE_TYPE_SKILL = 24 Public Const TILE_TYPE_GUILDBLOCK = 25 Public Const TILE_TYPE_HOOKSHOT = 26 Public Const TILE_TYPE_WALKTHRU = 27 Public Const TILE_TYPE_ROOF = 28 Public Const TILE_TYPE_ROOFBLOCK = 29 Public Const TILE_TYPE_ONCLICK = 30 Public Const TILE_TYPE_LOWER_STAT = 31 ```data1, 2, 3: used in some tile types for integers (warp, item, etc.) string1, 2, 3: used in some tile types for strings (notice, sign, etc.)
  5. If you want them to level up once they have enough experience, you need to add Call LevelUp(Index) after you set their experience. It'll only level the player up if they have enough experience, so you could put it anywhere a player gains experience for any reason and not have to worry.
  6. Which version of Eclipse are you using, and where did you paste the code?
  7. In this block: ``` If CanTake(Index, 178, 0) Then Call GiveCurrency(Index, 277, 1) Call playermsg(index, "You hand Her your graveyard key, She then hands it back", 14) Call playermsg(index, "Thanks, I just never got to see one before!", 14) Call playermsg(index, "She hands you 125 Gold QUEST COMPLETE", 14) Call PutVar("Chest\" & GetPlayerName(index) & ".ini", "Chest", "Chest11", "Have") Exit Sub End If Call playermsg(index, "Oh... You don't have it...", 14) Exit Sub End If ```The first "End If" should be "Else".
  8. I think "Currency" is a VBScript (and thus SadScript) keyword, so you can't use it as the name of a function. If that's not the problem, it might be because the NPCs are improperly set up. I'd make sure the NPCs have at least 1 HP if they still don't work.
  9. Kinda. The way you have it there, it'll say: "Hello, young [class] come forth.", then it'll immediately say "This scripted tile has no apparent use." right after that. You should add a new case, case 1, right before case else, then cut and paste the if/elseif/end if section to case 1.
  10. I can't find anything wrong with it. Perhaps it's not your MenuScripts sub, but your custom menus that are broken? Maybe you changed the menu titles or indexes around. Perhaps you should try replacing it with your old MenuScripts and see if that actually works. If it does, then the problem is with MenuScripts, after all. Otherwise, it's elsewhere in your code.
  11. For the multiple ships thing, you can just do this: Case 1 If [the player has permissions for galleon] Then 'modified sailing script ElseIf [the player has permissions for light sloop] Then 'sailing script End If You only need 1 case to make it work. Also, note ElseIf is one word. For items, you can just take everything away from the player's inventory (remember to save it to a .ini file), except the cannon, and give it back when the player steps onto land. For spells, you could do something similar. I'll leave it to you to figure out the exact code, since you seem competent.
  12. Can you post your main.txt? Post a link to it, or if you want to post it here, put it in a code box ([ code] tags).
  13. Try making sure the NPCs you're using have HP. Messages and scripts only trigger on an NPC when it has HP. (That's not really a scripting error, though…)
  14. Try removing this line: ``` Player = 0 ```
  15. ``` Dim BookPrice Dim BookItemNum Dim BorrowingTime BookPrice = Int(GetVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library","BookPrice") & "") BookItemNum = Int(GetVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library","BookItemNum") & "") BorrowingTime = Int(GetVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library","BorrowingTime") & "") If GetVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library","Borrowing") = "Yes" Then If BorrowingTime > 0 Then BorrowingTime = BorrowingTime - 1 Call PutVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library","BorrowingTime", BorrowingTime) Call PlayerMsg(Index, "You have " & BorrowingTime & " borrowing time left.", BRIGHTBLUE) End If If BorrowingTime < 0 Then If CanTake(Index, 4, BookPrice) = True Then Call TakeItem(Index, 4, BookPrice) Call PlayerMsg(Index, "You have been charged for not returning your book in the set time.", BRIGHTRED) Else Call PlayerMsg(Index, "You have been jailed for not returning your book in the set time, and not being able to pay.", BRIGHTRED) Call PlayerMsg(Index, "You will get out of jail next time you log in.", BRIGHTRED) Call PlayerMsg(Index, "You are blacklisted and can not borrow books from the library in a while.", BRIGHTRED) Call PlayerMsg(Index, "Your book will be taken.", BRIGHTRED) Call PlayerWarp(Index, 1, 0, 0) Call TakeItem(Index, BookItemNum, 0) Call PutVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library", "Blacklist", 5) Call PutVar("scripts\charextras\" & GetPlayerName(index) & ".ini", "Library", "Jailed", "Yes") End If End If End If ```If that doesn't work, then there's probably some bug in the .ini file itself or the code that puts values into it.
×
×
  • Create New...