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
|
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 |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
11-03-2013 12:29 AM |
|
|
seafish
Apprentice
Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0
|
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 |
|
|
Mordaunt
Super Moderator
Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35
|
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>
(This post was last modified: 11-03-2013 05:59 AM by Mordaunt.)
|
|
11-03-2013 04:27 AM |
|
|
User(s) browsing this thread: 1 Guest(s)