SphereCommunity
Random Rares - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Submissions (/Forum-Script-Submissions)
+--- Thread: Random Rares (/Thread-Random-Rares)



Random Rares - Mordaunt - 09-02-2013 11:53 AM

Inspiration for this one came from this thread : Weird Timer Issue

This script will:

Periodically place rare NPCs in random locations on the map.
Periodically place locked loot chests in random locations on the map. (Players will have to pick the locks)

No gembits used so issues with sector sleep preventing generation of rares.
Completely random map locations (or as random as it can be)
Will not spawn on water, in town, on rock or underground (dungeons, indoors)

NPCs will remain in the wild until they are killed/die or in the case of animals and mounts, are tamed.

Chests will remain in the world for a minimum of 3 days and not longer than the period set for the next chest to spawn. (through natural decay)
Chests can be made non moveable so players must pick them at their location, alternatively players can be allowed to move the chests which will negate their timers allowing them to pick the lock at their leisure.

Both the NPCs and the chests/templates used by this system are fully configurable to suit your server.

It's actually stupidly simple.

Random Rares


RE: Random Rares - dagger4k - 09-03-2013 12:51 AM

Very nice and simple Smile Any chance you can incorporate a ## of chests / npcs to spawn in the world? I'm saying this as I played a server where chests would randomly appear around the map containing items. This would actually encourage players to run around the map and not just sit in britain etc.


RE: Random Rares - Mordaunt - 09-03-2013 03:44 AM

Yes I can, and yes I just did. version 1.1 now available.
Also fixed chest more2 values.


RE: Random Rares - amonvangrell - 09-03-2013 06:51 AM

this is amazing, its the type of thing that are always welcome. thank you chief! ;]


RE: Random Rares - dagger4k - 09-03-2013 05:26 PM

very nice Smile


RE: Random Rares - Rattlehead - 09-03-2013 06:20 PM

how about this:

PHP Code:
[Function f_rare_npcspawn//special mounts or special mobs to kill are all good in here.
DORAND 10   //add your NPCs after this and change the number to match how many lines are inside the DORAND
    
serv.newnpc c_a_mustang_black
    serv
.newnpc c_a_mustang_roan
    serv
.newnpc c_a_mustang_crimson
    serv
.newnpc c_a_mustang_grey
    serv
.newnpc c_a_mustang_chocolate
    serv
.newnpc c_a_mustang_redroan
    serv
.newnpc c_a_mustang_pamamino
    serv
.newnpc c_a_mustang_sky
    serv
.newnpc c_a_mustang_skygray
    serv
.newnpc c_a_mustang_wimmimate
ENDDO
NEW.timerf <somereallylongnumberhere>,f_ridspawn
NEW.<dlocal.x>, <dlocal.y>
NEW.
FIX
serv
.log Rare <new.nameSpawned @ <dlocal.x>,<dlocal.y>


[FUNCTION 
f_ridspawn]
if (
0<findlayer.30.link> == 0)
REMOVE
endif 
clear any spawns out that didnt have a master yet Wink better than nothing lol


RE: Random Rares - Mordaunt - 09-03-2013 08:39 PM

Well sure, I could've done that, but I was assuming people would put rare mobs to kill and stuff in there too, which would never get a master. So I didn't bother with a remove thing on purpose. Mustangs were put in there just for testing. Tongue


RE: Random Rares - Mordaunt - 09-03-2013 11:51 PM

v1.2: Because Rattlehead got me second guessing my decision not to remove NPCs spawned with a timer. Damn you Rattlehead! lol

ADDED: Timer to remove "untamed" rares NPC between 3 and <npc_spawn>+1 days after spawning with def to enable this new option.

You can still put any NPC you want in here, the check will prevent any mounts or animals from being removed if they have been tamed. Anything not tamed or special monsters that were added for players to kill will despawn when their timer expires, if this option is enabled. Should keep things interesting at any rate.

ADJUSTED: Decay timer for chests to allow upper limit of <chest_spawn>+1 to allow a little overlap, reducing chance of zero chests remaining in the world.


RE: Random Rares - amonvangrell - 09-04-2013 06:51 AM

and its getting better and better! thx!