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

Havear

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Havear's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Wow, for such a simple error it stumped me. I guess that proves that I am a noob scripter. Thanks!
  2. Here is my entire scripted spell sub ``` Sub ScriptedSpell(Index, Script) Select Case Script Dim Target Case 0 Call PlayerMsg(Index, "This scripted spell has no apparent use.", WHITE) Exit Sub Case 1 Dim MDC 'This is a simple flame spell 'Damages target for Magic stat plus 5 MDC = Int(GetPlayerMagi(index) + 5) If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, MDC) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, MDC) End If Exit Sub Case 2 Call PlayerMsg(Index, "No spell script found. Please contact an admin to solve this problem.", WHITE) 'This is a generic spell. Dim Damage2 Dim Map2 Dim X2 Dim Y2 'Gets Magic Value and adds base damage Damage2 = Int(GetPlayerMagi(Index) + 5) 'Next three lines store player map number, x position, and y position to variables Map2 = Int(GetPlayerMap(Index)) X2 = Int(GetPlayerX(Index)) Y2 = Int(GetPlayerY(Index)) If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, Damage2) 'Casts spell animation Call SpellAnim(1, Map2, X2, Y2) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, Damage2) 'Casts spell animation Call SpellAnim(1, Map2, X2, Y2) End If 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 ``` When I try case 2 by itself, it works. However, in the current script, it will not work. Even the message I placed right after the case refuses to show. Any help is appreciated.
  3. Is there a way to identify an NPC with a number like PlayerID? And is it also possible to get the class from a player? Would it be something like ``` Dim NPC Dim Class Class = GetPlayerClass(Index) NPC = GetPlayerTargetNPC(Index) ```
  4. Havear

    Bad menus

    Is it just me, or are the menus bad.(I can't click easily. Only one pixel is input) Example: Bank
  5. @DrNova: > What excatly is this HQ for? Similiar to a house but you can have advanced commands like view map, attack another players HQ, set up quests, etc.
  6. Say I was scripting an HQ for a player. How could I script it so that the player could enter it but see no one else, while anyone else could do the same at the same time?
  7. Try this in the ScriptedTile sub ``` Case 1 Dim HP HP = Int(GetPlayerHP(index) + 50) Call SetPlayerHP(index, HP) Call sendHp(index) Exit Sub ``` Modify 50 to what number you need. Or I am addressing the wrong problem?
  8. Are you using the set command or are you putting current HP into and integer and than add the health points to that?
  9. Thanks a lot! I thought it was something like that but I couldn't get it to work … Thanks again!
  10. I am trying to figure out how I can add the Magic stat level to the damage caused by the following script. ``` Case 1 Dim Target ' This is a simple flame spell If Int(GetPlayerTarget(Index)) > 0 Then Target = GetPlayerTarget(Index) Call DamagePlayer(Index, Target, 5) Else Target = GetPlayerTargetNPC(Index) Call DamageNPC(Index, Target, 5) End If Exit Sub ``` Can anyone help?
×
×
  • Create New...