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

Squiddle's Post with lots of questions


Squiddle
 Share

Recommended Posts

Also for #6 if it's stored client-side the player can switch the number to give themselves whatever sprite they want.
For both tiles:
(This one was posted a few posts back. How you're doing this tile effects the other tile)

Changes the sprite (you still need to set the sprite number)
```
  Case 0
                    Call PutVar("\Scripts\charextras\"&GetPlayerName(Index)&".ini","Sprite","normal",GetPlayerSprite(Index))
                    Call SetPlayerSprite(Index, sprite#)
                    Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
                    Exit Sub

```

Sets the player's Sprite back to the original:
```
Case 1
    Call SetPlayerSprite(Index, GetVar("\Scripts\charextras\"&GetPlayerName(Index)&".ini","Sprite","normal"))
    Exit Sub
```
Link to comment
Share on other sites

everything in time, first 6: here you go

as the variable is in the server no need for packets :)

Server:
now add under the line where you save the variable this line (creates ini)

```
WriteINI("SPRITE", "Value", YOUR SPRITE VARIABLE, App.Path & "\Accounts\Sprites\" & Getplayername(Index) & ".ini")
```
make sure you create a Sprites folder in your Accounts folder.
this saves the variable in a extern ini file, witch makes it possible to load it another time (you don't loose it while loggin out)

server:

when you want to make the sprite return to his original one (you saved) add this

```
dim origsprite as long
origsprite = ReadINI("SPRITE", "Value",  App.Path & "\Accounts\Sprites\" & Getplayername(Index) & ".ini")

Call SetPlayerSprite(Index, origsprite)
```
there u go!
now, i didn't check this: there might be some spelling mistakes or something if you have any further issues contact me ^^

- Tyr

EDIT: lol Zeno posted while i was writing this ^^
Link to comment
Share on other sites

so a source code that displays an form with as image one from the GUI folder?
or a form from the gui folder, then this will be sadscript (i don't know sadscript very well, but i can look up the code for you)

also… what does the card needs to display?
Link to comment
Share on other sites

Marsh: Thanks =).

Tyr: Ok, I have an item in the game. It's just an item. I want to script it so it displays a picture in the center of the screen when used (Scripted item). If you look in the scripting database, you'll ifnd Mr.Miguu's script which shows an image, that's what I want except I want it in scripted item form, not scripted tile.
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...