Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
src.spelleffect
Author Message
Osi
Apprentice
*

Posts: 4
Likes Given: 4
Likes Received: 0 in 0 posts
Joined: Jan 2015
Reputation: 0



Post: #1
src.spelleffect
on=@death

SRC.SPELLEFFECT s_earthquake , <MAGERY>
src.newitem i_gold { 300 400 }


why its not working Cry I tried cast 57 and something diffrent too but its not working. my first scp failed CryCry
02-01-2015 11:03 AM
Find all posts by this user Like Post Quote this message in a reply
Jim
Apprentice
*

Posts: 28
Likes Given: 1
Likes Received: 12 in 4 posts
Joined: Jan 2015
Reputation: 0



Post: #2
RE: src.spelleffect
in the part of "on=@death" , the "src" is the npc(death) too.

and because you are using "<MAGERY>" , so be sure the npc(death) have the "MAGERY" property with value,
otherwise you must use a number directly.
//
on=@death
ref1=<attacker.uid>
ref1.spelleffect s_earthquake,100.0 // the spelleffect will be performed on the player(who kill the npc)
serv.newitem i_gold {300 400}
ref1.bounce <new> // there are some gold put into the backpack of the player(who kill the npc)
(This post was last modified: 02-01-2015 05:52 PM by Jim.)
02-01-2015 05:19 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Jim's post
Osi
Apprentice
*

Posts: 4
Likes Given: 4
Likes Received: 0 in 0 posts
Joined: Jan 2015
Reputation: 0



Post: #3
RE: src.spelleffect
Code:
16:48:ERROR:(test.scp,38)Undefined keyword 'ref1.spelleffect'
16:48:ERROR:(test.scp,40)Undefined keyword 'ref1.bounce'
ERROR:GC: 1 unplaced object deleted
ERROR:UID=040001b42, id=0eed 'gold coin', Invalid code=3202 (Object not placed in the world)
problem is if you die before npc u cant get loot and sphere giving error like this.

Code:
17:08:ERROR:(test.scp,35)Undefined symbol 'uid'
ref1=<attacker.uid> and I did ref1=<attacker.last>
thanks for helping

and how I can use this?
Code:
[FUNCTION npccast]
// Determine spell and skill used to cast
LOCAL.SPELL = <EVAL <ARGV[0]> &~ 0ff000000>
LOCAL.SKILL = <EVAL (<STREAT <SERV.SPELL.<LOCAL.SPELL>.SKILLREQ>>) &~ 0ff000000>
IF !(<LOCAL.SKILL>)
    LOCAL.SKILL = 25
ENDIF

// Set spell target
IF (<ARGV> > 2)
    ACT = 0
    ACTP = <ARGV[1]>, <ARGV[2]>, <ARGV[3]>, <ARGV[4]>
ELSE
    REF1 = <ARGV[1]>
    IF !(<REF1.UID>)
        REF1 = <ACT.UID>
        IF !(<REF1.UID>)
            REF1 = <UID>
        ENDIF
    ENDIF
    ACT = <REF1.UID>
    ACTP = <REF1.P>
ENDIF

// Set character action
ACTPRV = <UID>
ACTARG1 = <LOCAL.SPELL>
ACTION = <LOCAL.SKILL>
RETURN 1

and 1 more thing ^^

Code:
on=@gethit  // here simple
if (<act.baseid> == c_vortex) // what's act? and why need use (<..> == why 2 time )
effect=3,i_fx_heal_effect,6,35,1 // efect=3 is spell but i_fx_heal_effect,6,35,1 what's this?
src.remove // ??
endif // we closed if thing
(This post was last modified: 02-02-2015 07:11 AM by Osi.)
02-02-2015 12:17 AM
Find all posts by this user Like Post Quote this message in a reply
Jim
Apprentice
*

Posts: 28
Likes Given: 1
Likes Received: 12 in 4 posts
Joined: Jan 2015
Reputation: 0



Post: #4
RE: src.spelleffect
about the function, i found some explain from the author:
//
// This function can be used to force a character to cast a specific
// spell. Works on both players and NPCs. Two arguments can be given:
//
// "NpcCast <spell>, <target>"
// spell --> spell id to cast
// target --> target (optional, default: previous action's target)
// - can be a uid or map location
//

about the "act","<..>" an effect..
can get the information from "spherewiki" :
"http://wiki.sphere.torfo.org/index.php/Main_Page", there are some Tutorials and Reference Compendium.
for exampe the EFFECT, : "http://wiki.sphere.torfo.org/index.php/EFFECT"
02-02-2015 10:44 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Jim's post
Post Reply 


Forum Jump:


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