SphereCommunity
Add to the NEXT Spot - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Add to the NEXT Spot (/Thread-Add-to-the-NEXT-Spot)

Pages: 1 2


RE: Add to the NEXT Spot - x77x - 10-14-2015 01:50 PM

Code:
[EVENTS e_cao_cao]
ON=@DeathCorpse
REF1=<ATTACKER.MAX>  //who ever did most damage
IF (<REF1.ISPLAYER>)
  FOR x 1 250
    IF (STRCMPI("<REF1.TAG.gslain<dLOCAL.X>>","Cao Cao")==0)
      REF1.SYSMESSAGE @0482 You have already defeated General Cao Cao...
      return 1  //prevent corpse creation
    ELIF (<ISEMPTY <REF1.TAG.gslain<dLOCAL.X>>>)
      REF1.TAG.gslain<dLOCAL.X>=Cao Cao
      REF1.SYSMESSAGE @0481 Congratulations! You have defeated General Cao Cao!
      return 0  //allow corpse creation
    ENDIF
  ENDFOR
ENDIF

this script no longer works, did something change @DeathCorpse?

on a side note, im trying to change it anyway

Code:
[EVENTS e_cao_cao]
ON=@Death
SRC.SAY NO!
REF1=<ATTACKER.MAX>  //who ever did most damage
IF (<REF1.ISPLAYER>)
  FOR x 1 250
    IF (STRCMPI("<REF1.TAG.gslain<dLOCAL.X>>","<SRC.TAG.NAMEX>")==0)
      REF1.SYSMESSAGE @0482 You have already defeated General <SRC.TAG.NAMEX>...
      serv.newitem i_head_<SRC.TAG.NAMEY>
      new.tag.date=<SERV.RTIME.FORMAT %I:%M%p %m-%d-%y>
      obj=<attacker.max>
      new.tag.killer=<obj.name>
      new.tag.killeruid=<obj.uid>
      trysrc <uid> new.bounce
      return 0  //1 prevent corpse creation
    ELIF (<ISEMPTY <REF1.TAG.gslain<dLOCAL.X>>>)
      REF1.TAG.gslain<dLOCAL.X>=<SRC.TAG.NAMEX>
      REF1.SYSMESSAGE @0481 Congratulations! You have defeated General <SRC.TAG.NAMEX>!
      serv.newitem i_head_<SRC.TAG.NAMEY>
      new.tag.date=<SERV.RTIME.FORMAT %I:%M%p %m-%d-%y>
      obj=<attacker.max>
      new.tag.killer=<obj.name>
      new.tag.killeruid=<obj.uid>
      trysrc <uid> new.bounce
      return 0  //allow corpse creation
    ENDIF
  ENDFOR
ENDIF

this works, but how do i correct this line?

serv.newitem i_head_<SRC.TAG.NAMEY>

namey will be cao_cao

build 2475 client 7.0.46.0


RE: Add to the NEXT Spot - x77x - 10-14-2015 09:16 PM

nevermind, got it


serv.newitem "i_head_<SRC.TAG.NAMEY>"