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

Why doesn't this work?


rboeger93
 Share

Recommended Posts

hey, I have no Idea why this will not work. I tried to make a scripted item that when u use it, it displays a spell animations on every x and y coordinate on the map; basicly a prototype for area effect spell animation.

```
sub AreaEffect(index, spellanimation)
dim xquar
dim yquar
xquar = 0
yquar = 0
do while xquar <= 19
call spellanim(spellanimation, getplayermap(index), xquar, yquar)
if xquar > yquar then
if yquar = 14 then
xquar = xquar + 1
else
yquar = yquar + 1
end if
elseif yquar > xquar then
xquar = xquar + 1
else
xquar = xquar + 1
end if
loop
end sub
```

that is my sub and this is what I used to call it up:
```
Sub ScriptedItem(Index, Script)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted item has no apparent use.", WHITE)
Exit Sub
Case 1
dim spellanimation
spellanimation = 2
Call AreaEffect(index, spellanimation)
Case Else
Call PlayerMsg(Index, "No item script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub
```
I used Case 1 btw. Anyway, I have no idea why it doesn't work, if you know reply backĀ  :P
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...