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
Reactivate/Respawn all
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #1
Reactivate/Respawn all
Hi there! I just want a script to reactivate all the Worldgem bits in the world (double click all the Worldgem in the world) because I have changed the names of all NPC's and others.

How can I do?

I tried something from the Wiki but it didn't work

Code:
[FUNCTION redospawns]
GO 1,1
FOR 0 1 //make loop through all 5 maps
    MAP = <LOCAL._FOR> //set the map
    FORCHARS 8000 //loop through all chars in the world (unless EA makes a map bigger than 8000x8000 squares)
        REF1 = <MEMORYFINDTYPE.memory_ispawned.LINK> //set REF1 to the spawngem of that npc
        IF (<REF1>) //checks if the npc has the spawn memory
            REF1.TIMER = <EVAL {<REF1.MOREX> <REF1.MOREY>} * 60> //set the spawn memory timer to the values specified when creating it
        ENDIF
    ENDFOR
ENDFOR

Thanks Smile
BTW [I always search in the forums first but I don't get this :'(]

[Image: 2hy9q0y.png]
(This post was last modified: 03-06-2015 03:44 PM by Lazarus.)
03-06-2015 03:43 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
JohnVeritas
Apprentice
*

Posts: 49
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 2



Post: #2
RE: Reactivate/Respawn all
Well change the forchars check with foritems e.g. :

Code:
foritems 8000
    if (<baseid> == i_worldgem_bit)
    dclick //<- deactivate
        timer 0 // <- reactivate
    endif
endfor

this is very simple but it will work, you can make it better Smile
03-06-2015 06:10 PM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #3
RE: Reactivate/Respawn all
(03-06-2015 06:10 PM)JohnVeritas Wrote:  Well change the forchars check with foritems e.g. :

Code:
foritems 8000
    if (<baseid> == i_worldgem_bit)
    dclick //<- deactivate
        timer 0 // <- reactivate
    endif
endfor

this is very simple but it will work, you can make it better Smile

I just want to do it 1 time or 2. So, if this works, is fine Smile

Thanks !

EDIT: 'you can't see the target' errors.
I'm in gm.

[Image: 2hy9q0y.png]
(This post was last modified: 03-07-2015 07:15 AM by Lazarus.)
03-07-2015 07:12 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
richm
Journeyman
*

Posts: 58
Likes Given: 4
Likes Received: 4 in 3 posts
Joined: Aug 2014
Reputation: 0



Post: #4
RE: Reactivate/Respawn all
[FUNCTION renegotiate]
FORINSTANCES i_worldgem_bit
USE 0
USE 0 //second one makes the first monster spawn instead of waiting for the timer to count down
ENDFOR
(This post was last modified: 03-07-2015 07:20 AM by richm.)
03-07-2015 07:15 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #5
RE: Reactivate/Respawn all
(03-07-2015 07:15 AM)richm Wrote:  [FUNCTION renegotiate]
FORINSTANCES i_worldgem_bit
USE 0
USE 0 //second one makes the first monster spawn instead of waiting for the timer to count down
ENDFOR

It stucks the server and not works o.O

EDIT: oh wait Shock

[Image: 2hy9q0y.png]
(This post was last modified: 03-07-2015 07:28 AM by Lazarus.)
03-07-2015 07:26 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
richm
Journeyman
*

Posts: 58
Likes Given: 4
Likes Received: 4 in 3 posts
Joined: Aug 2014
Reputation: 0



Post: #6
RE: Reactivate/Respawn all
What version do you use? Im using a recent version and it works fine. If you have many spawns it might hang your client temporarily (it does on mine) but it does work... ?
03-07-2015 07:29 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #7
RE: Reactivate/Respawn all
(03-07-2015 07:29 AM)richm Wrote:  What version do you use? Im using a recent version and it works fine. If you have many spawns it might hang your client temporarily (it does on mine) but it does work... ?

I had main threads problems because use it. :'(

Let me see one more time.

EDIT: still main thread problems.

I have the spawns of the spawners in the forums Tongue [OSI LIKE] and just in the map 0

[Image: 2hy9q0y.png]
(This post was last modified: 03-07-2015 07:45 AM by Lazarus.)
03-07-2015 07:34 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #8
RE: Reactivate/Respawn all
[function spawnremove]
forchars 65000
if (<npc>)
remove
endif
endfor

[function respawn]
foritems 65000
if (<baseid> == i_worldgem_bit)
timer 0
endif
endfor
03-07-2015 10:16 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #9
RE: Reactivate/Respawn all
(03-07-2015 10:16 AM)azmanomer Wrote:  [function spawnremove]
forchars 65000
if (<npc>)
remove
endif
endfor

[function respawn]
foritems 65000
if (<baseid> == i_worldgem_bit)
timer 0
endif
endfor

have to use like 5 or 6 times each function but works perfectly Smile

Thanks!

[Image: 2hy9q0y.png]
03-07-2015 08:28 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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