Spawn Doctor - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Spawn Doctor (/Thread-Spawn-Doctor) |
Spawn Doctor - Barnabus - 10-16-2012 09:23 AM Hi All Immaking a little script for the submissions section. "The spawn doctor" but I need some help. ForInstances Spawns Count++ Tag Count EndFor Open Dialog Display Spawn Count, Selection Filters a Range thats variable. OnButton Search for Spawns Check Input CALL Function search for spawns...... ^^All was fine until : I wanted to stop in a loop: FOR X 1 <TotalSPawnCount> SpawnNumber = X Display Spawn Details and Dialog next and last button set X as -2 or 0 Endfor Or maybe : FORINSTANCES aSpawn If Passes all the filters WHILE (Wait on user input from dialog) // Tag User With Spawn Parameters to sent to Dialog // Display SDialog ENDWHILE ENDFOR ^^ That wasnt happy. FORCONTS? Can I pass a variable with it like FORCONTS X maybe ? FORINSTANCES? Could it be a FORCONT with IF BASEID = ARGS or is it different? I want to stop a FORINSTANCES by either tripping it like X-- or by nesting and spinning a loop inside it; rather than tagging all the spawns with a number n then having to do a full search of the world spawns again just to find the Next one tagged n++. Can I ? RE: Spawn Doctor - Extreme - 10-16-2012 09:31 AM Return 1 ? RE: Spawn Doctor - Shaklaban - 10-16-2012 06:51 PM when i saw that post first i was terrified, very (this part about the post of a forumbot which has lot of text in, probably get deleted when you are reading this). about the topic, im using forinstances to set spawn timers when i made change (contains some internal functions from my shard): PHP Code: [defname spawn_sureleri] RE: Spawn Doctor - Barnabus - 10-16-2012 08:26 PM Nice one guys, though I think Ive lead you both up the wrong street ! I would like to increment the loop via user intervention. I do not want to exit the loop (Return 1) untill the user is bored of flicking through spawns, this is what I want to do. Forinstances i_worldgem_bit IF Passes the filters (Filters are MORE1 MORE2 and amount) OPen a Dialog Showing this spawns stats FOR WHILE Or something I can Spin to stop ForInstances icrementing to the next spawn and Stay Here untill the user selects next back close or research ENDFOR ENDIF ENDFOR ^^ The Theroy is if we spin the nested loop the main loop will not increment until we exit the nested loop. What do you all think > Doable or not Doable RE: Spawn Doctor - Shaklaban - 10-16-2012 08:31 PM i understand now maybe you can do it like this: [function spawnlari_ayarla] ref1=<uid> forinstances i_worldgem_bit if <type> = t_spawn_char ref1.ctag.spawn_<dlocal._for>=<uid> endif endfor then you can reach all spawns with a dialog which reads ctags RE: Spawn Doctor - Barnabus - 10-16-2012 09:09 PM Thanks Shaklaban, Ive tried this one, but my client was running out of memory and I thought it was the 10000 CTAGS later I realised there was an error in the loop, so it maybe was not the CTAGS, and I didnt recheck I just went bannanas. AND <dlocal._for> Geez I never thought of that ! Thanks So maybe this will work - but it isnt Ideal because - PHP Code: [FUNCTION f_SpawnAnalyzer] Oh Shit this will work it is Ideal !! Because I can now flick through the CTAGS on the player get the UID and do what I like then, and I wont have to LOOP the entire server every time to find SpawnSelection_3_ for example. Very Nice hopefully the client can handle 1000's of CTAGS ! Ill get back to this later to test it... Thanks When I went Bannanas I did this. PHP Code: [FUNCTION f_SpawnAnalyzerMoreThanAmount] Then I got looped into trying to pause a loop in the middle of it (If I could something like this it saves 1000 of Ctags) |