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-nmm6 (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-nmm6 (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-nmm6 (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
Weapon Gump dialog
Author Message
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #1
Weapon Gump dialog
I made this script for a WARSHARD.
But doesn't matter what Button the player press. It always will give a Short Spear.



[Image: 7mrk.png]

PHP Code:
// Created 27/01/2014 11:37:59, with Gump Studio.
// Exported with with SphereExporter ver 1.1.
// Script for 0.56/Revisions

[DIALOG d_armas]
0,0
NOCLOSE
page 0
resizepic 157 62 9200 207 364
tilepic 190 173 5121
textentry 231 97 99 20 0 0 0
tilepic 187 205 5123
tilepic 195 252 5127
tilepic 188 280 5117
tilepic 187 311 5042
tilepic 191 349 5119
textentry 254 175 88 20 0 0 1
textentry 254 212 88 20 0 0 2
textentry 253 252 88 20 0 0 3
textentry 240 287 102 20 0 0 4
textentry 256 320 88 20 0 0 5
textentry 254 352 88 20 0 0 6
tilepic 177 76 5384
button 170 219 9702 9703 1 0 0
button 171 261 9702 9703 1 0 0
button 171 295 9702 9703 1 0 0
button 170 358 9702 9703 1 0 0
button 172 326 9702 9703 1 0 0
button 172 179 9702 9703 1 0 0
button 288 391 1026 1027 1 0 0

[DIALOG d_armas text]
Escolha a arma
Kryss
Short Spear
War Mace
Heavy Crossbow
Bow
Katana

[DIALOG d_armas button]
ON=0
// Short Spear
// 
SRC.NEWITEM i_spear_short
SRC
.ACT.equip

ON
=0
// War Mace
// 
SRC.NEWITEM i_mace_war
SRC
.ACT.equip

ON
=0
// Heavy Crossbow
// 
SRC.NEWITEM i_crossbow_heavy
SRC
.ACT.EQUIP

ON
=0
// Katana
// 
SRC.NEWITEM i_katana
SRC
.ACT.equip

ON
=0
// Bow
// 
SRC.NEWITEM i_BOW
SRC
.ACT.BOUNCE

ON
=0
// Button Kryss
// 
SRC.NEWITEM i_kryss
SRC
.ACT.equip

ON
=0
// Button 8
// 


[EOF
01-27-2014 11:46 PM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #2
RE: Weapon Gump dialog
You must change the button id/param. Every button is set to 0, set them starting by 1 (0 is reserved for dialog closing)

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
01-27-2014 11:49 PM
Find all posts by this user Like Post Quote this message in a reply
larmc20
Journeyman
*

Posts: 67
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2013
Reputation: 0



Post: #3
RE: Weapon Gump dialog
Thank man. It worked.
01-27-2014 11:53 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Weapon Gump dialog
(01-27-2014 11:46 PM)larmc20 Wrote:  I made this script for a WARSHARD.
But doesn't matter what Button the player press. It always will give a Short Spear.



[Image: 7mrk.png]

PHP Code:
// Created 27/01/2014 11:37:59, with Gump Studio.
// Exported with with SphereExporter ver 1.1.
// Script for 0.56/Revisions

[DIALOG d_armas]
0,0
NOCLOSE
page 0
resizepic 157 62 9200 207 364
tilepic 190 173 5121
textentry 231 97 99 20 0 0 0
tilepic 187 205 5123
tilepic 195 252 5127
tilepic 188 280 5117
tilepic 187 311 5042
tilepic 191 349 5119
textentry 254 175 88 20 0 0 1
textentry 254 212 88 20 0 0 2
textentry 253 252 88 20 0 0 3
textentry 240 287 102 20 0 0 4
textentry 256 320 88 20 0 0 5
textentry 254 352 88 20 0 0 6
tilepic 177 76 5384
button 170 219 9702 9703 1 0 1
button 171 261 9702 9703 1 0 2
button 171 295 9702 9703 1 0 3
button 170 358 9702 9703 1 0 4
button 172 326 9702 9703 1 0 5
button 172 179 9702 9703 1 0 6
button 288 391 1026 1027 1 0 7

[DIALOG d_armas text]
Escolha a arma
Kryss
Short Spear
War Mace
Heavy Crossbow
Bow
Katana

[DIALOG d_armas button]
ON=1
// Short Spear
// 
SRC.NEWITEM i_spear_short
SRC
.ACT.equip

ON
=2
// War Mace
// 
SRC.NEWITEM i_mace_war
SRC
.ACT.equip

ON
=3
// Heavy Crossbow
// 
SRC.NEWITEM i_crossbow_heavy
SRC
.ACT.EQUIP

ON
=4
// Katana
// 
SRC.NEWITEM i_katana
SRC
.ACT.equip

ON
=5
// Bow
// 
SRC.NEWITEM i_BOW
SRC
.ACT.BOUNCE

ON
=6
// Button Kryss
// 
SRC.NEWITEM i_kryss
SRC
.ACT.equip

ON
=7
// Button 8
// 


[EOF

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
01-27-2014 11:54 PM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #5
RE: Weapon Gump dialog
Why are you using textentry instead of label? They're intended to use when the server must ask the user to entry some value
Also, download the updated sphere export plugin. I've recompiled it some time ago but it is still working, and using a more effective syntax (dtext, dtextentry, dhtmlgump...)


Attached File(s)
.zip  SphereGumpExport.zip (Size: 9.37 KB / Downloads: 8)

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
(This post was last modified: 01-28-2014 08:15 AM by Feeh.)
01-28-2014 08:13 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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