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

Proofread Pls


Diskmaster
 Share

Recommended Posts

Can any 1 c if there is a syntax error or something for me, thx!

```
Case 62
If GetPlayerHP(index)<251 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(202, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
Call SetPlayerHP(index, 5)
Call MapMsg(GetPlayerMap(index), GetPlayerName(index)"Just hit the boss with an HP strike, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)
End If

Case 63
If GetPlayerMP(index)<251 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(204, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SpellAnim(203, GetPlayerMap(index), 13, 3)
Call SpellAnim(203, GetPlayerMap(index), 14, 3)
Call SpellAnim(203, GetPlayerMap(index), 15, 3)
Call SpellAnim(203, GetPlayerMap(index), 16, 3)
Call SpellAnim(203, GetPlayerMap(index), 17, 3)
Call SpellAnim(203, GetPlayerMap(index), 13, 4)
Call SpellAnim(203, GetPlayerMap(index), 14, 4)
Call SpellAnim(203, GetPlayerMap(index), 15, 4)
Call SpellAnim(203, GetPlayerMap(index), 16, 4)
Call SpellAnim(203, GetPlayerMap(index), 17, 4)
Call SetMapNpcHP(89, 194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
Call SetPlayerHP(index, 5)
Call MapMsg(GetPlayerMap(index), "WOW"GetPlayerName(index)"Just hit the boss with an MP strike, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)
End If

Case 64
Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
Call SetMapNpcHP( 89, 1194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
Call SetPlayerHP(index, GetPlayerHP(index)-GetPlayerHP(index))
Call MapMsg(GetPlayerMap(index), GetPlayerName(index)"Just sacraficed himself to strike the boss, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)

Case 65
Call Prompt(index, "If you use this beacon, it will cause instant death to you, but will cause massive damage to the boss, still proceed?", 17)

```
Oh, and they are scripted tiles
Link to comment
Share on other sites

@Diskmaster:

> Can any 1 c if there is a syntax error or something for me, thx!
>
> ```
> Case 62
> If GetPlayerHP(index)<251 Then
> Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
> Else
> Call SpellAnim(202, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
> Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
> Call SetPlayerHP(index, 5)
> Call MapMsg(GetPlayerMap(index), GetPlayerName(index)"Just hit the boss with an HP strike, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)
> End If
>
> Case 63
> If GetPlayerMP(index)<251 Then
> Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
> Else
> Call SpellAnim(204, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
> Call SpellAnim(203, GetPlayerMap(index), 13, 3)
> Call SpellAnim(203, GetPlayerMap(index), 14, 3)
> Call SpellAnim(203, GetPlayerMap(index), 15, 3)
> Call SpellAnim(203, GetPlayerMap(index), 16, 3)
> Call SpellAnim(203, GetPlayerMap(index), 17, 3)
> Call SpellAnim(203, GetPlayerMap(index), 13, 4)
> Call SpellAnim(203, GetPlayerMap(index), 14, 4)
> Call SpellAnim(203, GetPlayerMap(index), 15, 4)
> Call SpellAnim(203, GetPlayerMap(index), 16, 4)
> Call SpellAnim(203, GetPlayerMap(index), 17, 4)
> Call SetMapNpcHP(89, 194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
> Call SetPlayerHP(index, 5)
> Call MapMsg(GetPlayerMap(index), "WOW"GetPlayerName(index)"Just hit the boss with an MP strike, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)
> End If
>
> Case 64
> Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
> Call SetMapNpcHP( 89, 1194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
> Call SetPlayerHP(index, GetPlayerHP(index)-GetPlayerHP(index))
> Call MapMsg(GetPlayerMap(index), GetPlayerName(index)"Just sacraficed himself to strike the boss, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)
>
> Case 65
> Call Prompt(index, "If you use this beacon, it will cause instant death to you, but will cause massive damage to the boss, still proceed?", 17)
>
> ```
> Oh, and they are scripted tiles

Try this:
```
Case 62
If GetPlayerHP(index) < 251 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(202, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
Call SetPlayerHP(index, 5)
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " Just hit the boss with an HP strike, now the boss has" & GetMapNpcHP( 89, 194) & " HP Left!", BRIGHTGREEN)
End If

Case 63
If GetPlayerMP(index) < 251 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(204, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SpellAnim(203, GetPlayerMap(index), 13, 3)
Call SpellAnim(203, GetPlayerMap(index), 14, 3)
Call SpellAnim(203, GetPlayerMap(index), 15, 3)
Call SpellAnim(203, GetPlayerMap(index), 16, 3)
Call SpellAnim(203, GetPlayerMap(index), 17, 3)
Call SpellAnim(203, GetPlayerMap(index), 13, 4)
Call SpellAnim(203, GetPlayerMap(index), 14, 4)
Call SpellAnim(203, GetPlayerMap(index), 15, 4)
Call SpellAnim(203, GetPlayerMap(index), 16, 4)
Call SpellAnim(203, GetPlayerMap(index), 17, 4)
Call SetMapNpcHP(89, 194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
Call SetPlayerHP(index, 5)
Call MapMsg(GetPlayerMap(index), "WOW " & GetPlayerName(index) &" Just hit the boss with an MP strike, now the boss has" & GetMapNpcHP( 89, 194) & " HP Left!", BRIGHTGREEN)
End If

Case 64
Call SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
Call SetMapNpcHP( 89, 1194, GetMapNpcHP( 89, 194)- GetPlayerMP(index))
Call SetPlayerHP(index, GetPlayerHP(index)-GetPlayerHP(index))
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) &" Just sacraficed himself to strike the boss, now the boss has" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)

Case 65
Call Prompt(index, "If you use this beacon, it will cause instant death to you, but will cause massive damage to the boss, still proceed?", 17)

```
Btw, turn on your script errors and tell me if you get one after my edits.
Link to comment
Share on other sites

```
SetMapNpcHP( 89, 194, GetMapNpcHP( 89, 194)- GetPlayerHP(index))
```Call SetMapNpcHP( MapNum, npc_Index, HitPoints)
npc_Index, refers to the number of npc they are on the map(up to 15)
```
GetMapNpcHP( 89, 194)
```Function GetMapNpcHP( MapNum, Index)
Index, refers to the number of the npc they are on the map(up to 15)

So your 89, is the map, which is more or less correct, aslong as it's a number <= your max_maps
but your 194… is way off, UNLESS you decided to make your game able to handle up to 194 npcs per map through the source...
Good DAY.. i'll look at more when i have some time..
Link to comment
Share on other sites

sry 2 bring this topic up again, but it STILL doesn't work, and Spechno, it says there is an expected ')' in :
```
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) &" Just sacraficed himself to strike the boss" GetMapNpcHP( 89, 194)"HP Left!", BRIGHTGREEN)

```and a type mismach 1 whenever I step on one of the scripted tiles
Link to comment
Share on other sites

```
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " Just sacraficed himself to strike the boss has " & GetMapNpcHP( 89, 194) & "HP Left!", BRIGHTGREEN)
```once again, you forgot the &'s before/after getmapnpchp, and you're using that command wrong AGAIN
Link to comment
Share on other sites

I just fixed it, and made it call for the onNPCDeath sub if the NPC in question has less than 1 hp. (with these tiles, I managed to kill it in one hit) on the bottom screen, it said You Killed a . I know I have the map # right and the npc I want it to damage is #1 on the map, but that NPC won't die, nothing dies?? R u sure index is referring to that(I see why it would be) Because it is failing (no error messages, just not working right) Here is the script:
```
Case 62
If GetPlayerHP(index) < 251 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(204, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SpellAnim(203, GetPlayerMap(index), 13, 3)
Call SpellAnim(203, GetPlayerMap(index), 14, 3)
Call SpellAnim(203, GetPlayerMap(index), 15, 3)
Call SpellAnim(203, GetPlayerMap(index), 16, 3)
Call SpellAnim(203, GetPlayerMap(index), 17, 3)
Call SpellAnim(203, GetPlayerMap(index), 13, 4)
Call SpellAnim(203, GetPlayerMap(index), 14, 4)
Call SpellAnim(203, GetPlayerMap(index), 15, 4)
Call SpellAnim(203, GetPlayerMap(index), 16, 4)
Call SpellAnim(203, GetPlayerMap(index), 17, 4)
Call SetMapNpcHP( 89, 1, GetMapNpcHP( 89, 1)- GetPlayerHP(index))
Call SetPlayerHP(index, 5)
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " Just hit the boss with an HP strike, now the boss has" & GetMapNpcHP( 89, 1) & " HP Left!", BRIGHTGREEN)
If GetMapNpcHP(89, 1)<1 Then
Call OnNPCDeath(Index, Map, NPCNum, NPCIndex)
End If
End If

Case 63
If GetPlayerMP(index) < 500 Then
Call PlayerMsg(index, "You feel too weak to fire the beacon!", BRIGHTRED)
Else
Call SpellAnim(204, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SpellAnim(203, GetPlayerMap(index), 13, 3)
Call SpellAnim(203, GetPlayerMap(index), 14, 3)
Call SpellAnim(203, GetPlayerMap(index), 15, 3)
Call SpellAnim(203, GetPlayerMap(index), 16, 3)
Call SpellAnim(203, GetPlayerMap(index), 17, 3)
Call SpellAnim(203, GetPlayerMap(index), 13, 4)
Call SpellAnim(203, GetPlayerMap(index), 14, 4)
Call SpellAnim(203, GetPlayerMap(index), 15, 4)
Call SpellAnim(203, GetPlayerMap(index), 16, 4)
Call SpellAnim(203, GetPlayerMap(index), 17, 4)
Call SetMapNpcHP(89, 1, GetMapNpcHP( 89, 1)- GetPlayerMP(index))
Call SetPlayerMP(index, 5)
Call MapMsg(GetPlayerMap(index), "WOW " & GetPlayerName(index) &" Just hit the boss with an MP strike, now the boss has" & GetMapNpcHP( 89, 1) & " HP Left!", BRIGHTGREEN)
If GetMapNpcHP(89, 1)<1 Then
Call OnNPCDeath(Index, Map, NPCNum, NPCIndex)
End If
End If

Case 64
Call SpellAnim(205, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-1)
Call SpellAnim(206, GetPlayerMap(index), 13, 3)
Call SpellAnim(206, GetPlayerMap(index), 14, 3)
Call SpellAnim(206, GetPlayerMap(index), 15, 3)
Call SpellAnim(206, GetPlayerMap(index), 16, 3)
Call SpellAnim(206, GetPlayerMap(index), 17, 3)
Call SpellAnim(206, GetPlayerMap(index), 13, 4)
Call SpellAnim(206, GetPlayerMap(index), 14, 4)
Call SpellAnim(206, GetPlayerMap(index), 15, 4)
Call SpellAnim(206, GetPlayerMap(index), 16, 4)
Call SpellAnim(206, GetPlayerMap(index), 17, 4)
Call SetMapNpcHP( 89, 1, GetMapNpcHP( 89, 1)- GetPlayerHP(index))
Call SetMapNpcHP( 89, 1, GetMapNpcHP( 89, 1)- GetPlayerMP(index))
Call SetPlayerHP(index, GetPlayerHP(index)-GetPlayerHP(index))
Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " Just sacraficed himself to strike the boss has " & GetMapNpcHP( 89, 1) & "HP Left!", BRIGHTGREEN)
Call OnDeath(Index)
If GetMapNpcHP(89, 1)<1 Then
Call OnNPCDeath(Index, Map, NPCNum, NPCIndex)
End If

Case 65
Call Prompt(index, "If you use this beacon, it will cause instant death to you, but will cause massive damage to the boss, still proceed?", 17)

```
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...