The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customizable Housing Tool!
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #9
RE: Customizable Housing Tool!
nah, you just need the item, it's called House Placement Tool
I can copy/paste from my OSI like house system. I made some changes to make it work without the complete system, you need some testing to check is everything is working fine.
And you need add your script house storage calculation on the dialog to make it show the house storage values (I cant implement mine because it's a different house system and my formula will not work on your script).

Code:
[ITEMDEF i_house_placement_tool]
ID=014f6
NAME=House Placement Tool
VALUE=1200
DUPELIST=014f5

ON=@DClick
SDIALOG d_house_placement_tool
return 1


[DIALOG d_house_placement_tool]
50,50

resizepic 0 0 5054 270 145
gumppictiled 10 10 250 125 2624
checkertrans 10 10 250 125
dhtmlgump 10 10 250 20 0 0 <DEF.BFONT_white><DEF.CENTER>HOUSE PLACEMENT TOOL<DEF.CENTERE>
button 10 40 4005 4007 1 0 1
dtext 45 40 1152 Classic Houses
button 10 60 4005 4007 1 0 2
dtext 45 60 1152 2-Story Customizable Houses
button 10 80 4005 4007 1 0 3
dtext 45 80 1152 3-Story Customizable Houses
button 10 110 4017 4019 1 0 0
dtext 45 110 1152 Close

[DIALOG d_house_placement_tool BUTTON]
ON=1 3
IF (<ARGN>==1)
  SRC.CTAG.Dialog.HousePlacementTool.Type = House_Classic
ELIF (<ARGN>==2)
  SRC.CTAG.Dialog.HousePlacementTool.Type = House_Custom_2story
ELIF (<ARGN>==3)
  SRC.CTAG.Dialog.HousePlacementTool.Type = House_Custom_3story
ENDIF
SDIALOG d_house_placement_tool_list


[DIALOG d_house_placement_tool_list]
50,50

page 0
resizepic 0 0 5054 520 420
gumppictiled 10 10 500 20 2624
checkertrans 10 10 500 20
dhtmlgump 10 10 500 20 0 0 <DEF.BFONT_white><DEF.CENTER>HOUSE PLACEMENT TOOL<DEF.CENTERE>
gumppictiled 10 40 500 20 2624
checkertrans 10 40 500 20
dtext 50 40 1152 House Description
dtext 265 40 1152 Storage
dtext 370 40 1152 Lockdowns
dtext 455 40 1152 Cost
gumppictiled 10 70 500 280 2624
checkertrans 10 70 500 280
gumppictiled 10 360 500 20 2624
checkertrans 10 360 500 20
dtext 10 360 1152 Bank Balance:
dtext 250 360 1152 <SRC.BANKBALANCE>
gumppictiled 10 390 500 20 2624
checkertrans 10 390 500 20
button 10 390 4017 4019 1 0 0
dtext 50 390 1152 Close

page 1
LOCAL.Page=1
LOCAL.N=1
LOCAL.Y=70
WHILE !(<isempty <DEF.<SRC.CTAG.Dialog.HousePlacementTool.Type>_<dLOCAL.N>>>)
  button 10 <LOCAL.Y> 4005 4007 1 0 <LOCAL.N>
  dtext 50 <LOCAL.Y> 1152 <SERV.ITEMDEF.<DEF.<SRC.CTAG.Dialog.HousePlacementTool.Type>_<dLOCAL.N>>.NAME>
  dtext 295 <LOCAL.Y> 1152 n/a
  dtext 385 <LOCAL.Y> 1152 n/a
  dtext 450 <LOCAL.Y> 1152 <SERV.ITEMDEF.<DEF.<SRC.CTAG.Dialog.HousePlacementTool.Type>_<dLOCAL.N>>.VALUE>
  LOCAL.Y += 20
  LOCAL.N ++
  IF (<LOCAL.Y> > 340)
    button 450 390 4005 4007 0 <eval <LOCAL.Page>+1> 0
    dtext 380 390 1152 Next
    LOCAL.Page ++
    page <LOCAL.Page>
    button 200 390 4014 4016 0 <eval <LOCAL.Page>-1> 0
    dtext 250 390 1152 Previous
    LOCAL.Y=70
  ENDIF
ENDWHILE

[DIALOG d_house_placement_tool_list BUTTON]
ON=0
SDIALOG d_house_placement_tool

ON=1 100
SRC.f_house_placement <DEF.<SRC.CTAG.Dialog.HousePlacementTool.Type>_<ARGN>>


[FUNCTION f_house_placement]
SERV.NEWITEM i_gold
NEW.TYPE=t_deed
NEW.MORE1=<ARGS>
NEW.CONT <SRC.FINDLAYER.21>
NEW.REMOVEFROMVIEW
NEW.USE
NEW.TIMERF 60,REMOVE


[DEFNAME Avaible_Houses]    //Avaible houses on House Placement Tool
House_Classic_1            "i_multi_house_stone_plaster_small"
House_Classic_2            "i_multi_house_stone_small"
House_Classic_3            "i_multi_house_stone_brick_small"
House_Classic_4            "i_multi_house_stone_wood_small"
House_Classic_5            "i_multi_house_wood_plaster_small"
House_Classic_6            "i_multi_house_wood_thatched_small"
House_Classic_7            "i_multi_shop_stone_small"
House_Classic_8            "i_multi_shop_marble_small"
House_Classic_9            "i_multi_tower_wizard"
House_Classic_10        "i_multi_house_patio_sand"
House_Classic_11        "i_multi_villa_2story"
House_Classic_12        "i_multi_cabin_log_2story"
House_Classic_13        "i_multi_house_3room"
House_Classic_14        "i_multi_house_wood_plaster_2story"
House_Classic_15        "i_multi_house_stone_plaster_2story"
House_Classic_16        "i_multi_shop_blacksmithy_large"
House_Classic_17        "i_multi_house_patio_marble"
House_Classic_18        "i_multi_tower"
House_Classic_19        "i_multi_keep"
House_Classic_20        "i_multi_castle"

House_Custom_2story_1        "i_multi_foundation_7x7"
House_Custom_2story_2        "i_multi_foundation_7x8"
House_Custom_2story_3        "i_multi_foundation_7x9"
House_Custom_2story_4        "i_multi_foundation_7x10"
House_Custom_2story_5        "i_multi_foundation_7x11"
House_Custom_2story_6        "i_multi_foundation_7x12"
House_Custom_2story_7        "i_multi_foundation_8x7"
House_Custom_2story_8        "i_multi_foundation_8x8"
House_Custom_2story_9        "i_multi_foundation_8x9"
House_Custom_2story_10        "i_multi_foundation_8x10"
House_Custom_2story_11        "i_multi_foundation_8x11"
House_Custom_2story_12        "i_multi_foundation_8x12"
House_Custom_2story_13        "i_multi_foundation_8x13"
House_Custom_2story_14        "i_multi_foundation_9x7"
House_Custom_2story_15        "i_multi_foundation_9x8"
House_Custom_2story_16        "i_multi_foundation_9x9"
House_Custom_2story_17        "i_multi_foundation_9x10"
House_Custom_2story_18        "i_multi_foundation_9x11"
House_Custom_2story_19        "i_multi_foundation_9x12"
House_Custom_2story_20        "i_multi_foundation_9x13"
House_Custom_2story_21        "i_multi_foundation_10x7"
House_Custom_2story_22        "i_multi_foundation_10x8"
House_Custom_2story_23        "i_multi_foundation_10x9"
House_Custom_2story_24        "i_multi_foundation_10x10"
House_Custom_2story_25        "i_multi_foundation_10x11"
House_Custom_2story_26        "i_multi_foundation_10x12"
House_Custom_2story_27        "i_multi_foundation_10x13"
House_Custom_2story_28        "i_multi_foundation_11x7"
House_Custom_2story_29        "i_multi_foundation_11x8"
House_Custom_2story_30        "i_multi_foundation_11x9"
House_Custom_2story_31        "i_multi_foundation_11x10"
House_Custom_2story_32        "i_multi_foundation_11x11"
House_Custom_2story_33        "i_multi_foundation_11x12"
House_Custom_2story_34        "i_multi_foundation_11x13"
House_Custom_2story_35        "i_multi_foundation_12x7"
House_Custom_2story_36        "i_multi_foundation_12x8"
House_Custom_2story_37        "i_multi_foundation_12x9"
House_Custom_2story_38        "i_multi_foundation_12x10"
House_Custom_2story_39        "i_multi_foundation_12x11"
House_Custom_2story_40        "i_multi_foundation_12x12"
House_Custom_2story_41        "i_multi_foundation_12x13"
House_Custom_2story_42        "i_multi_foundation_13x8"
House_Custom_2story_43        "i_multi_foundation_13x9"
House_Custom_2story_44        "i_multi_foundation_13x10"
House_Custom_2story_45        "i_multi_foundation_13x11"
House_Custom_2story_46        "i_multi_foundation_13x12"
House_Custom_2story_47        "i_multi_foundation_13x13"

House_Custom_3story_1        "i_multi_foundation_9x14"
House_Custom_3story_2        "i_multi_foundation_10x14"
House_Custom_3story_3        "i_multi_foundation_10x15"
House_Custom_3story_4        "i_multi_foundation_11x14"
House_Custom_3story_5        "i_multi_foundation_11x15"
House_Custom_3story_6        "i_multi_foundation_11x16"
House_Custom_3story_7        "i_multi_foundation_12x14"
House_Custom_3story_8        "i_multi_foundation_12x15"
House_Custom_3story_9        "i_multi_foundation_12x16"
House_Custom_3story_10        "i_multi_foundation_12x17"
House_Custom_3story_11        "i_multi_foundation_13x14"
House_Custom_3story_12        "i_multi_foundation_13x15"
House_Custom_3story_13        "i_multi_foundation_13x16"
House_Custom_3story_14        "i_multi_foundation_13x17"
House_Custom_3story_15        "i_multi_foundation_13x18"
House_Custom_3story_16        "i_multi_foundation_14x9"
House_Custom_3story_17        "i_multi_foundation_14x10"
House_Custom_3story_18        "i_multi_foundation_14x11"
House_Custom_3story_19        "i_multi_foundation_14x12"
House_Custom_3story_20        "i_multi_foundation_14x13"
House_Custom_3story_21        "i_multi_foundation_14x14"
House_Custom_3story_22        "i_multi_foundation_14x15"
House_Custom_3story_23        "i_multi_foundation_14x16"
House_Custom_3story_24        "i_multi_foundation_14x17"
House_Custom_3story_25        "i_multi_foundation_14x18"
House_Custom_3story_26        "i_multi_foundation_15x10"
House_Custom_3story_27        "i_multi_foundation_15x11"
House_Custom_3story_28        "i_multi_foundation_15x12"
House_Custom_3story_29        "i_multi_foundation_15x13"
House_Custom_3story_30        "i_multi_foundation_15x14"
House_Custom_3story_31        "i_multi_foundation_15x15"
House_Custom_3story_32        "i_multi_foundation_15x16"
House_Custom_3story_33        "i_multi_foundation_15x17"
House_Custom_3story_34        "i_multi_foundation_15x18"
House_Custom_3story_35        "i_multi_foundation_16x11"
House_Custom_3story_36        "i_multi_foundation_16x12"
House_Custom_3story_37        "i_multi_foundation_16x13"
House_Custom_3story_38        "i_multi_foundation_16x14"
House_Custom_3story_39        "i_multi_foundation_16x15"
House_Custom_3story_40        "i_multi_foundation_16x16"
House_Custom_3story_41        "i_multi_foundation_16x17"
House_Custom_3story_42        "i_multi_foundation_16x18"
House_Custom_3story_43        "i_multi_foundation_17x12"
House_Custom_3story_44        "i_multi_foundation_17x13"
House_Custom_3story_45        "i_multi_foundation_17x14"
House_Custom_3story_46        "i_multi_foundation_17x15"
House_Custom_3story_47        "i_multi_foundation_17x16"
House_Custom_3story_48        "i_multi_foundation_17x17"
House_Custom_3story_49        "i_multi_foundation_17x18"
House_Custom_3story_50        "i_multi_foundation_18x13"
House_Custom_3story_51        "i_multi_foundation_18x14"
House_Custom_3story_52        "i_multi_foundation_18x15"
House_Custom_3story_53        "i_multi_foundation_18x16"
House_Custom_3story_54        "i_multi_foundation_18x17"
House_Custom_3story_55        "i_multi_foundation_18x18"
(This post was last modified: 05-20-2014 01:37 PM by Coruja.)
05-20-2014 01:32 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Post Reply 


Messages In This Thread
Customizable Housing Tool! - Lazarus - 05-17-2014, 12:49 PM
RE: Customizable Housing Tool! - Mordaunt - 05-17-2014, 07:00 PM
RE: Customizable Housing Tool! - Coruja - 05-18-2014, 12:29 PM
RE: Customizable Housing Tool! - Lazarus - 05-18-2014, 01:02 PM
RE: Customizable Housing Tool! - Mordaunt - 05-18-2014, 07:27 PM
RE: Customizable Housing Tool! - Extreme - 05-19-2014, 05:05 AM
RE: Customizable Housing Tool! - Lazarus - 05-19-2014, 10:52 AM
RE: Customizable Housing Tool! - Extreme - 05-19-2014, 12:07 PM
RE: Customizable Housing Tool! - Coruja - 05-20-2014 01:32 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)