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

Just your basic Question


Diskmaster
 Share

Recommended Posts

Hey, I am trying to make my own player housing scripts (furniture, housepets, servants, Ect, I will release it when Done!!!) and I was wondering, I know that there is a tile-setting script, but is there an attribute setting script, like one that would set a cirtain location as block when the script is activated? I would like to know, it is important to script furniture, I hope someone can help me!!
Link to comment
Share on other sites

No, just the command, I want to make my own
Thx, Ill look into it but does any 1 know the command, it is for furniture, it would set the furniture down in front of you and then block you where the furniture is supposed to be blocked, so u don't just walk thru it!!
Link to comment
Share on other sites

```
Call SetAttribute(Map, X, Y, Attrib, Data1, Data2, Data3, String1, String2, String3)

```Not sure how it works though; I'm sure screwing around with it, can figure it out; for future reference though, there is a pinned topic in the Scripting board: http://www.touchofdeathforums.com/smf/index.php/topic,28153.0.html
Link to comment
Share on other sites

SetAttribute(map, x, y, attribute, data1, data2, data3, string1, string2, string3)

map, x, y: obvious
attributes (from source):
```
Public Const TILE_TYPE_WALKABLE = 0
Public Const TILE_TYPE_BLOCKED = 1
Public Const TILE_TYPE_WARP = 2
Public Const TILE_TYPE_ITEM = 3
Public Const TILE_TYPE_NPCAVOID = 4
Public Const TILE_TYPE_KEY = 5
Public Const TILE_TYPE_KEYOPEN = 6
Public Const TILE_TYPE_HEAL = 7
Public Const TILE_TYPE_KILL = 8
Public Const TILE_TYPE_SHOP = 9
Public Const TILE_TYPE_CBLOCK = 10
Public Const TILE_TYPE_ARENA = 11
Public Const TILE_TYPE_SOUND = 12
Public Const TILE_TYPE_SPRITE_CHANGE = 13
Public Const TILE_TYPE_SIGN = 14
Public Const TILE_TYPE_DOOR = 15
Public Const TILE_TYPE_NOTICE = 16
Public Const TILE_TYPE_CHEST = 17
Public Const TILE_TYPE_CLASS_CHANGE = 18
Public Const TILE_TYPE_SCRIPTED = 19
'Public Const TILE_TYPE_NPC_SPAWN = 20
Public Const TILE_TYPE_HOUSE = 21
'Public Const TILE_TYPE_CANON = 22
Public Const TILE_TYPE_BANK = 23
'Public Const TILE_TYPE_SKILL = 24
Public Const TILE_TYPE_GUILDBLOCK = 25
Public Const TILE_TYPE_HOOKSHOT = 26
Public Const TILE_TYPE_WALKTHRU = 27
Public Const TILE_TYPE_ROOF = 28
Public Const TILE_TYPE_ROOFBLOCK = 29
Public Const TILE_TYPE_ONCLICK = 30
Public Const TILE_TYPE_LOWER_STAT = 31

```data1, 2, 3: used in some tile types for integers (warp, item, etc.)
string1, 2, 3: used in some tile types for strings (notice, sign, etc.)
Link to comment
Share on other sites

Wow, that is GREAT!! thx guys, When I finally finish my game, I am DEFINATELY putting in something thanking all of you for your help in my game, like a shrine that says *Most Scripts Made Possible by: And then I list all the people who helped me in any major (or minor/important) way afterward, Thx
____________________________________________________________________________________________________
Oh, And can any 1 write me a quick If command that checks if the map u r on is your house and THEN executes it?
Link to comment
Share on other sites

You could do this…
```
Case #
Call Prompt(Index, "Do you wish to buy this house for (Cost)?", #)
Exit Sub

``````
Case #
If CanTake(Index, (Currency#), (Cost)) Then
    Call TakeItem(Index, (Currency#), (Cost))
    Call PlayerMsg(Index, "You bought this house!", BLUE)
    Call PutVar("Scripts/Houses/" & GetPlayerMap(Index) & ".ini", "HOUSE", "HouseOwnedBy", GetPlayerName(Index)
Else
    Call PlayerMsg(Index, "You do not have enough money to buy this house!", BRIGHTRED)
End If
Exit Sub

``````
Case #
Call PlayerMsg(Index, "Ok, if you change your mind come back!", BLUE)
Exit Sub

```Then just add this before any of the house editing stuff.
```
If GetVar("Scripts/Houses/" & GetPlayerMap(Index) & ".ini", "HOUSE", "HouseOwnedBy") = GetPlayerName(Index) Then

```And for an Else, do this
```
Else
Call PlayerMsg(Index, "You do not own this house, you can not edit it!", BRIGHTRED)
End If

```I hope that works, since I made it just for you, and haven't used it xD
Link to comment
Share on other sites

You might be able to send the packet via sadscript; that's how you're able to open a bank via sadscirpt, even know there is no sadscript command:
Call SendDataTo(Index, "openbank" & Chr$(237))
You may be able to edit the house and via sadscript the same way; ballie made a tutorial on that: http://www.touchofdeathforums.com/smf/index.php/topic,45334.0.html
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...