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

Mount script


bboy44
 Share

Recommended Posts

I got this mount script: http://www.touchofdeathforums.com/smf/index.php/topic,39617.0.html

When I put it inside of a case then make an item with that case it only mods my speed. It doesnt change my sprite, any help?

Here is what it looks like:

> Case 1
> If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="No" Then
> Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","SpriteNumber",GetPlayerSprite(Index))
> Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting","Yes")
> Call PlayerMsg(Index,"You mounted", WHITE)
> Call SetPlayerSprite(Index, 109)
> Call LockAttack(Index, 1)
> Call LockSpells(Index, 1)
> Call SetSpeed(Index, "walk", 16)
> Else
> Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")
> Call SetPlayerSprite(Index, Getvar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount", "SpriteNumber"))
> Call SetPlayerSprite(Index, 141)
> Call LockAttack(Index, 0)
> Call LockSpells(Index, 0)
> Call SetSpeed(Index, "walk", 4)
> Call SendPlayerData(index)
> Call PlayerMsg(Index,"You dismounted", WHITE)
> End if

It is inside Sub ScriptedItem.

If anyone could help me I would greatly appreciate it.
Link to comment
Share on other sites

Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")

this is suppose to be

Else GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="Yes" Then

i believe that is your problem see if that works?

sry messed up but i chaged it now  XD
Link to comment
Share on other sites

@durama:

> Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")
>
> this is suppose to be
>
> If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="Yes" Then
>
> i believe that is your problem see if that works?

I think that's just the format from the quote tags (next time, he should use code tags).

Anyway, after "Call LockSpells(Index, 1)" but before "Call SetSpeed(Index, "walk", 16)", put:
Call SendPlayerData(Index)
Link to comment
Share on other sites

I did what you said Admiral but it still does not seem to work.

> Case 1
> If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="No" Then
>   Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","SpriteNumber",GetPlayerSprite(Index))
>   Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting","Yes")
>   Call PlayerMsg(Index,"You mounted", WHITE)
>   Call SetPlayerSprite(Index, 109)
>   Call LockAttack(Index, 1)
>   Call LockSpells(Index, 1)
>   Call SendPlayerData(Index)
>   Call SetSpeed(Index, "walk", 16)
> Else
>   Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")
>   Call SetPlayerSprite(Index, Getvar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount", "SpriteNumber"))
>   Call SetPlayerSprite(Index, 141)
>   Call LockAttack(Index, 0)
>   Call LockSpells(Index, 0)
>   Call SetSpeed(Index, "walk", 4)
>   Call SendPlayerData(index)
>   Call PlayerMsg(Index,"You dismounted", WHITE)
> End if
Link to comment
Share on other sites

Try this:
```
Case 1
If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="No" Or _
If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="" Then
  Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","SpriteNumber",GetPlayerSprite(Index))
  Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting","Yes")
  Call PlayerMsg(Index,"You mounted", WHITE)
  Call SetPlayerSprite(Index, 109)
  Call LockAttack(Index, 1)
  Call LockSpells(Index, 1)
  Call SendPlayerData(Index)
  Call SetSpeed(Index, "walk", 16)
Else
  Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")
  Call SetPlayerSprite(Index, Int(GetVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount", "SpriteNumber")))
  Call SetPlayerSprite(Index, 141)
  Call LockAttack(Index, 0)
  Call LockSpells(Index, 0)
  Call SetSpeed(Index, "walk", 4)
  Call SendPlayerData(index)
  Call PlayerMsg(Index,"You dismounted", WHITE)
End If

```
And please usetags and nottags for codes and scripts.
Link to comment
Share on other sites

Okay, I see what I did wrong; I added another "If" (if you look at that line, it should jsut be GetVar, not "If GetVar").

Anyway, try this:
```
Case 1
If GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="No" Or _
GetVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting")="" Then
  Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","SpriteNumber",GetPlayerSprite(Index))
  Call PutVar("Scripts\Charextras\" &GetPlayerName(Index)& ".ini","Mount","IsMounting","Yes")
  Call PlayerMsg(Index,"You mounted", WHITE)
  Call SetPlayerSprite(Index, 109)
  Call LockAttack(Index, 1)
  Call LockSpells(Index, 1)
  Call SendPlayerData(Index)
  Call SetSpeed(Index, "walk", 16)
Else
  Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount","IsMounting","No")
  Call SetPlayerSprite(Index, Int(GetVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini","Mount", "SpriteNumber")))
  Call SetPlayerSprite(Index, 141)
  Call LockAttack(Index, 0)
  Call LockSpells(Index, 0)
  Call SetSpeed(Index, "walk", 4)
  Call SendPlayerData(index)
  Call PlayerMsg(Index,"You dismounted", WHITE)
End If

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