SphereCommunity
[UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Submissions (/Forum-Script-Submissions)
+--- Thread: [UPDATE]Amon Vangrell - World Decorator [OSI LIKE] (/Thread-UPDATE-Amon-Vangrell-World-Decorator-OSI-LIKE)

Pages: 1 2 3 4 5 6 7 8


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - amonvangrell - 05-20-2013 07:33 AM

New Update!
VERSION = 1.0A

ALL facets completed!

This is the first look on the final script, i believe that there will be some things to be fix, but i think that the big part is done.
Enjoy! Big Grin


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - Extreme - 05-20-2013 08:00 AM

Quanto tempo tá levando pra dar spawn em tudo??


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - amonvangrell - 05-20-2013 08:03 AM

(05-20-2013 08:00 AM)Extreme Wrote:  Quanto tempo tá levando pra dar spawn em tudo??
eh rapido, coisa de 2 segs o arquivo mais pesado, no todo, uns 7 segs. Big Grin

To spawn everything it took like 7 segs. Big Grin


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - amonvangrell - 05-20-2013 01:46 PM

Look of Orcs Dungeon.
b4/after.
;]

Orcs dungeon entrance.
and
Look of Khaldum Dungeon.

;]


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - dagger4k - 05-21-2013 02:24 AM

I must say.. Amazing job!


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

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


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - RanXerox - 05-21-2013 09:53 AM

[ITEMDEF i_world_generator]
DEFNAME=worldgen

That is a pointless construct... the word you use after ITEMDEF *is* the DEFNAME... setting DEFNAME again on its own is not necessary.


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - amonvangrell - 05-21-2013 10:12 AM

(05-21-2013 02:24 AM)dagger4k Wrote:  I must say.. Amazing job!

THX!!

(05-21-2013 09:53 AM)RanXerox Wrote:  [ITEMDEF i_world_generator]
DEFNAME=worldgen

That is a pointless construct... the word you use after ITEMDEF *is* the DEFNAME... setting DEFNAME again on its own is not necessary.

SRY ABOUT THAT, I PUT THAT JUST TO BE EASY TO ADD IN-GAME.
I'LL FIX IT. ;D

MY CAPS IS BROOKED, SRY...
(05-21-2013 08:33 AM)Staff_Stanic Wrote:  RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE]
Congratulations! Really really well!

Thx and I'll do that!!


RE: [NEW UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - amonvangrell - 05-21-2013 12:25 PM

New Update!
Version=1.0B

Fix all tips given by Staff_Stannic and RanXerox.
Fix some wrong gumps on more trammel gump.
Implemented the new Apocalypse Function, now wiping all items from all maps!!
Minor bugs in some files with wrong items id.

I forgot to previously inform that, to the function moongate work, you will need Mordaunt's moongate script that you can found here:
Mordaunt moongate - Thx Mordaunt Big Grin


RE: [UPDATE]Amon Vangrell - World Decorator [OSI LIKE] - Staff_Stanic - 05-22-2013 02:36 AM

Hey! Just more tips Big Grin
(Just a PS.: I don't test! Please, check before Big Grin)

After:
PHP Code:
////////////////////////////////////////////
[FUNCTION RDOOR]
FORITEMS 9999 
    
IF (<TYPE> == t_door
        
REMOVE
    
ENDIF
ENDFOR
////////////////////////////////////////////
[FUNCTION RSIGN]
FORITEMS 9999
    
IF (<TYPE> == t_sign_gump)
        
REMOVE
    
ENDIF
ENDFOR
////////////////////////////////////////////
[FUNCTION RMOONGATE]//THX TO STAFF STANIC!
FORINSTANCES i_moongate_blue
 REMOVE
ENDFOR 
////////////////////////////////////////////
[FUNCTION F_APOCALYPSE_FINAL]
FORITEMS 9999
        REMOVE
    UPDATE
ENDFOR
////////////////////////////////////////////
[function F_APOCALYPSE]
tag.pos = <src.p>
src.invis
SRC
.GO 1 1 0
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 0 Done.
SRC.GO 1 1 0 1
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 1 Done.
SRC.GO 1 1 0 2
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 2 Done.
SRC.GO 1 1 0 3
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 3 Done.
SRC.GO 1 1 0 4
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 4 Done.
SRC.GO 1 1 0 5
F_APOCALYPSE_FINAL
SRC
.SYSMESSAGE MAPPLANE 5 Done.
src.go <tag.pos>
src.invis
Tag
.pos=
////////////////////////////////////////////
[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
F_APOCALYPSE
 ARGS
="Apocalypse Completed!"
ENDIF
SYSMESSAGE @0800 <ARGS>
SDIALOG d_spawner 
Before:
PHP Code:
////////////////////////////////////////////
[FUNCTION RemoveWorldItems]
SERV.NEWITEM i_gold
FOR 0 5
 
NEW.P=1,1,1,<dLOCAL._FOR>
 NEW.<
ARGS>
ENDFOR
NEW.
REMOVE

////////////////////////////////////////////
[FUNCTION RDoor]
RemoveWorldItems f_RDoor

[FUNCTION f_RDoor]
FORITEMS 9999
 
IF (<TYPE> == t_door)
  
REMOVE
 
ENDIF
ENDFOR

////////////////////////////////////////////
[FUNCTION RSign]
RemoveWorldItems f_RSign

[FUNCTION f_RSign]
FORITEMS 9999
 
IF (<TYPE> == t_sign_gump)
  
REMOVE
 
ENDIF
ENDFOR

////////////////////////////////////////////
[FUNCTION RMoonGate]
FORINSTANCES i_moongate_blue
 REMOVE
ENDFOR 

////////////////////////////////////////////
[FUNCTION Apocalypse]
RemoveWorldItems f_Apocalypse

[FUNCTION f_Apocalypse]
FORITEMS 9999
 REMOVE
ENDFOR

////////////////////////////////////////////
[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