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:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[UPDATE]Amon Vangrell - World Decorator [OSI LIKE]
Author Message
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #16
RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE]
Congratulations! Really really well! Big Grin
Hey, can I give you some tips?

First, otimize your buttons functions:
PHP Code:
[DIALOG d_spawner BUTTON]

ONBUTTON=// Cancel
RETURN 1
//
ONBUTTON=1
generatedoors
src
.sysmessage @06 Door's Generation complete!
dialog d_spawner
RETURN 1

etc 
Use like this:
PHP Code:
[DIALOG d_spawner BUTTON]
ON=
return 1

ON
=1 16
IF (<ARGN>==1)
 
SERV.GenerateDoors
 ARGS
="Door's Generation complete!"
ELIF (<ARGN>==2)
 
SERV.RDoor
 ARGS
="Doors Removed!"
ELIF (<ARGN>==3)
 
SERV.GenerateSign
 ARGS
="Signs Generation complete!"
ELIF (<ARGN>==4)
 
SERV.RSign
 ARGS
="Signs Removed!"
ELIF (<ARGN>==5)
 
SERV.MakeGates
 ARGS
="Moongates Generation complete!"
ELIF (<ARGN>==6)
 
SERV.RMoonGate
 ARGS
="Moongates Removed!"
ELIF (<ARGN>==7)
 
SDIALOG d_apocalypse
ELIF 
(<ARGN>==8)
 
SERV.GenFelucca
 ARGS
="The Felucca Facet Generated."
ELIF (<ARGN>==9)
 
SERV.GenTrammel
 SERV
.f_GenerateDoors_T
 SERV
.f_GenMisc_T
 SERV
.f_GenerateSign_T
 ARGS
="The Trammel Facet Generated."
ELIF (<ARGN>==10)
 
SERV.GenIlshenar
 ARGS
="The Ilshenar Facet Generated."
ELIF (<ARGN>==11)
 
SERV.GenMalas
 ARGS
="The Malas Facet Generated."
ELIF (<ARGN>==12)
 
SERV.GenTokuno
 ARGS
="The Tokuno Facet Generated."
ELIF (<ARGN>==13)
 
SERV.GenTermur
 ARGS
="The Ter Mur Facet Generated."
ELIF (<ARGN>==14)
 
SDIALOG d_gen_felucca
 ARGS
=85
ELIF 
(<ARGN>==15)
 
SDIALOG d_gen_trammel
 ARGS
=85
ELIF 
(<ARGN>==16)
 
SDIALOG d_spawner_ilshenar
 ARGS
=85
ENDIF
IF !(<
isempty <ARGS>>)
 IF (<
isnum <ARGS>>)
  
SOUND <dARGS>
 ELSE
  
SYSMESSAGE @06 <ARGS>
 ENDIF
ENDIF 
Basically the same thing, but the logic for sphere read, is simpler and reduced number of lines of your script.

Second:
PHP Code:
[FUNCTION RMOONGATE]
FORITEMS 9999
    
IF (<BASEID> == i_moongate)
        
REMOVE
    
ENDIF
ENDFOR 
Use like this:
PHP Code:
[FUNCTION RMoonGate]
FORINSTANCES i_moongate
 REMOVE
ENDFOR 
Using FORINSTANCES you'll have a decrease loop's time.

Another thing:
PHP Code:
[PLEVEL 6]
worldgen

[itemdef i_world_generator]
DEFNAME=worldgen
ID
=0E2F
name
=World Generator
type
=t_normal
WEIGHT
=1

on
=@dclick
dialog d_spawner
return 
Change for this:
PHP Code:
[ITEMDEF i_world_generator]
ID=0E2F
NAME
=World Generator
TYPE
=t_normal
WEIGHT
=1

ON
=@DClick
IF (<SRC.ACCOUNT.PLEVEL> >= 6)
 
SRC.Worldgen
ENDIF
return 

Just a security if a noob take this item.

This:
PHP Code:
[DIALOG d_apocalypse]
100,100
resizepic 10 10 9200 300 100
//fundo cinza
dtext 110 20 1947 ARE YOU SURE?
dtext 90 80 1947 Go Back.
dtext 25 50 026 [ATTENTION ALL ITEMS WILL BE DELETED!]
button 50 80 4014 4016 1 0 1//Back
button 210 80 249 248 1 0 2//Okay
//
[DIALOG d_apocalypse BUTTON]
ONBUTTON=0
src
.sysmessage @0800  Apocalypse Canceled!
src.dialog d_spawner// Cancel
RETURN 1
//
ONBUTTON=1
src
.sysmessage @0800  Apocalypse Canceled!
src.dialog d_spawner// Cancel
RETURN 1
//
ONBUTTON=2
APOCALYPSE
src
.sysmessage @0800  Apocalypse Completed!
src.dialog d_spawner// Cancel
RETURN 
Use like this:
PHP Code:
[DIALOG d_apocalypse]
100,100
resizepic 10 10 9200 300 100
dtext 110 20 1947 ARE YOU SURE
?
dtext 90 80 1947 Go Back.
dtext 25 50 026 [ATTENTION ALL ITEMS WILL BE DELETED!]
button 50 80 4014 4016 1 0 1
button 210 80 249 248 1 0 2

[DIALOG d_apocalypse BUTTON]
ON=0 2
IF (<ARGN> < 2)
 
ARGS="Apocalypse Canceled!"
ELSE
 
SERV.Apocalypse
 ARGS
="Apocalypse Completed!"
ENDIF
SYSMESSAGE @0800 <ARGS>
SDIALOG d_spawner 

Thank you for this awesome Decorator script! Good job Big Grin
(This post was last modified: 05-21-2013 09:54 AM by Staff_Stanic.)
05-21-2013 08:33 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - Staff_Stanic - 05-21-2013 08:33 AM

Forum Jump:


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