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
Question bout <local.mob>
Author Message
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #1
Question bout <local.mob>
hello!
In merge script there is:
Code:
SERV.NEWNPC c_elem_<local.mob>

Instead of <local.mob> I should to place npc chardef? For example:
Code:
SERV.NEWNPC c_elem_fat
11-03-2013 12:27 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Question bout <local.mob>
Yeah, the <local.mob> is the final of the chardef

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
11-03-2013 12:29 AM
Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #3
RE: Question bout <local.mob>
thanks!

Hm, I forgot something to ask!
Code:
local.mob= c_elem_<local.mob>


under resourcefound trigger. This will create new elem from my elem list?
(This post was last modified: 11-03-2013 12:34 AM by seafish.)
11-03-2013 12:30 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Question bout <local.mob>
local.mob=agapite
serv.newnpc=c_elem_<local.mob>

this will works if you have this npc scripted, you must ensure that only existing npcs are being called in this function.
11-03-2013 02:26 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Question bout <local.mob>
Reading the script helps:

Quote:Custom elementals can be added easily for your custom ores, just ensure that their reads [DEFNAME c_elem_<ore name>]

The script looks to see what ore you just dug up and spawns an elemental based upon it, taking the ore name.
The ore name becomes <local.mob> allowing you to summon c_elem_<local.mob>

Where <local.mob> is for example iron, if you just dug up iron then the script would summon c_elem_iron

Code:
//paste this to each [REGIONRESOURCE <oretype>] section in sphere_items_provisions_ore.scp
ON=@RESOURCEFOUND  
    ref1=<argo>
    local.more1=<ref1.more1> //<---- read the ore type
    local.mob= <strsub 3 4 <local.more1>>    //  <----- isolate the ore type
    local.mob= c_elem_<local.mob> //<--- create a summonable elemental name
    call f_earth_mob_spawn
//end paste

[FUNCTION f_earth_mob_spawn]
IF (<eval RAND(100)> < 10)
    DORAND 3
        SERV.NEWNPC c_elem_earth
        SERV.NEWNPC c_elem_granite
        SERV.NEWNPC <local.mob>  //<--- summon elemental if the rand falls here
    ENDDO
    NEW.UPDATEX
    NEW.ANIM 12
    NEW.ATTACK <SRC>
ENDIF

There is an error that crept in there somewhere which I have now corrected. the last serv.newnpc contained the name c_elem_<local.mob> instead of just <local.mob>

[Image: 2nis46r.jpg]
(This post was last modified: 11-03-2013 05:59 AM by Mordaunt.)
11-03-2013 04:27 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #6
RE: Question bout <local.mob>
thank you guys! Its really helpful info!
11-03-2013 05:57 AM
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)