Diskmaster Posted July 15, 2009 Author Share Posted July 15, 2009 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 More sharing options...
Mr. Bob Firefarter Posted July 15, 2009 Share Posted July 15, 2009 I believe Zultar made a house editor that allowed the player to set block attributes. Link to comment Share on other sites More sharing options...
Diskmaster Posted July 15, 2009 Author Share Posted July 15, 2009 No, just the command, I want to make my ownThx, 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 More sharing options...
Admiral Refuge Posted July 15, 2009 Share Posted July 15, 2009 ```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 More sharing options...
DarkMazer Posted July 15, 2009 Share Posted July 15, 2009 SetAttribute(map, x, y, attribute, data1, data2, data3, string1, string2, string3)map, x, y: obviousattributes (from source):```Public Const TILE_TYPE_WALKABLE = 0Public Const TILE_TYPE_BLOCKED = 1Public Const TILE_TYPE_WARP = 2Public Const TILE_TYPE_ITEM = 3Public Const TILE_TYPE_NPCAVOID = 4Public Const TILE_TYPE_KEY = 5Public Const TILE_TYPE_KEYOPEN = 6Public Const TILE_TYPE_HEAL = 7Public Const TILE_TYPE_KILL = 8Public Const TILE_TYPE_SHOP = 9Public Const TILE_TYPE_CBLOCK = 10Public Const TILE_TYPE_ARENA = 11Public Const TILE_TYPE_SOUND = 12Public Const TILE_TYPE_SPRITE_CHANGE = 13Public Const TILE_TYPE_SIGN = 14Public Const TILE_TYPE_DOOR = 15Public Const TILE_TYPE_NOTICE = 16Public Const TILE_TYPE_CHEST = 17Public Const TILE_TYPE_CLASS_CHANGE = 18Public Const TILE_TYPE_SCRIPTED = 19'Public Const TILE_TYPE_NPC_SPAWN = 20Public Const TILE_TYPE_HOUSE = 21'Public Const TILE_TYPE_CANON = 22Public Const TILE_TYPE_BANK = 23'Public Const TILE_TYPE_SKILL = 24Public Const TILE_TYPE_GUILDBLOCK = 25Public Const TILE_TYPE_HOOKSHOT = 26Public Const TILE_TYPE_WALKTHRU = 27Public Const TILE_TYPE_ROOF = 28Public Const TILE_TYPE_ROOFBLOCK = 29Public Const TILE_TYPE_ONCLICK = 30Public 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 More sharing options...
Admiral Refuge Posted July 15, 2009 Share Posted July 15, 2009 I had a feeling that's what they were for, but wasn't entirely sure. Link to comment Share on other sites More sharing options...
Diskmaster Posted July 15, 2009 Author Share Posted July 15, 2009 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 More sharing options...
DarkSpine Posted July 16, 2009 Share Posted July 16, 2009 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 IfExit 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```ElseCall 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 More sharing options...
Diskmaster Posted July 16, 2009 Author Share Posted July 16, 2009 Thx, but no, I mean on the current VB Player housing commands, How do u make it check if the house is yours? (in sad script)I am using the player housing built into the system, but I am making my own furniture Link to comment Share on other sites More sharing options...
DarkSpine Posted July 16, 2009 Share Posted July 16, 2009 You can't, at least not in any of the commands I have ever seen, that is why I wrote that up… Link to comment Share on other sites More sharing options...
Diskmaster Posted July 16, 2009 Author Share Posted July 16, 2009 Oh… Well, your command is just as good AND I can edit it to make it so that it dissapears afterward =)there is only 1 more thing I want for scripts, but I don't think I will need it just yet so... I won't ask, Thx again!! Link to comment Share on other sites More sharing options...
Diskmaster Posted July 16, 2009 Author Share Posted July 16, 2009 Oh, and one more thing, if u own a house, your script doesn't check if someone already owns the house before you buy it, but I fixed it and, thx again, this script works almost perfectly and just about exactly what I wanted!! Link to comment Share on other sites More sharing options...
DarkSpine Posted July 16, 2009 Share Posted July 16, 2009 Hey, no problem, glad I could help. Link to comment Share on other sites More sharing options...
Diskmaster Posted July 16, 2009 Author Share Posted July 16, 2009 Uh oh, now the scripted tile for buying a house doesn't work with my new command added (I added it b4 testing tho)So, could you see if something was wrong with the original Script, and Yes, I did add the folders that the script requires Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 16, 2009 Share Posted July 16, 2009 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 More sharing options...
Diskmaster Posted July 16, 2009 Author Share Posted July 16, 2009 Hmm, sounds complicated… I don't have VB6 so I can't view the source, let alone find commands for sending packets in it! If someone could write the command for me, I would be very grateful Link to comment Share on other sites More sharing options...
DarkSpine Posted July 16, 2009 Share Posted July 16, 2009 Try turning on scripting errors, and tell me what error you get… Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now