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
Provocation CloudBR help
Author Message
tom2008
Apprentice
*

Posts: 7
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Jun 2015
Reputation: 0



Post: #1
Provocation CloudBR help
hey guys im after some help im trying to get cloudbrs provocation script to work but the monsters aint attacking each other on success anyone else have a problem or a different system i could use? no errors they just dont attack each other...

Code:
[FUNCTION F_CHECK_PROVOKEDDISTANCE]
REF1=<TAG0.PROVOKER> //player that provoked me
IF (!(<ISEVENT.E_PROVOKED>))
TAG.PROVOKER=
ELIF ((!(<REF1.CANSEELOS <UID>>)) || (<DISTANCE <REF1>> > <EVAL 8+(<REF1.MUSICIANSHIP>/150)>))
REMOVEALLMEMS memory_war_targ
FLAGS &= ~statf_war
ACTION=06d
TAG.PROVOKER=
EVENTS -e_provoked
ELIF (!(<REF1.ISONLINE>))
REMOVEALLMEMS memory_war_targ
FLAGS &= ~statf_war
ACTION=06d
TAG.PROVOKER=
EVENTS -e_provoked
ELSE
TIMERF 1,F_CHECK_PROVOKEDDISTANCE
ENDIF

[EVENTS E_PROVOKED]
ON=@DeathCorpse
TAG.PROVOKER
EVENTS -e_provoked

ON=@Kill
IF (<TAG0.PROVOKER> == <ARGO.TAG0.PROVOKER>)
TAG.PROVOKER=
EVENTS -e_provoked
ENDIF

[FUNCTION F_PROVOCATION]
IF (!(<ARGO.CANSEELOS>))
SYSMESSAGELOC -1,501583
ELIF (<ARGO.ISITEM>)
SYSMESSAGELOC -1,501589
ELIF ((<ARGO.ISPLAYER>) || (<ARGO.NPC> == brain_vendor) || (<ARGO.NPC> == brain_banker)
SYSMESSAGELOC -1,501589
ELIF (!(<FINDTYPE.t_musical>))
SYSMESSAGE @946,3,1 You must have a musical instrument with you.
ELSE
TARGETFW F_PROVOKE_NEW <ARGO.UID>
SYSMESSAGELOC -1,501587
ENDIF

[FUNCTION F_PROVOKE_NEW]
REF1=<ARGN1> //monster incited
//ARGO = monster ref1 is being incited AT
IF (!(<FINDTYPE.t_musical>))
SYSMESSAGE @946,3,1 You must have a musical instrument with you.
ELIF (<CTAG0.FIXMUSIC>)
SYSMESSAGE @946,3,1 You must wait before provoking other creatures.
ELIF (!(<ARGO.CANSEELOS>))
SYSMESSAGELOC -1,501583
ELIF (<ARGO.DISTANCE <UID>> > <EVAL 8+(<MUSICIANSHIP>/150)>) || (<REF1.DISTANCE <UID>> > <EVAL 8+(<MUSICIANSHIP>/150)>)
SYSMESSAGELOC -1,1049449
ELIF (<ARGO.DISTANCE <REF1.UID>> > 18)
SYSMESSAGELOC -1,1049450
ELIF (<ARGO.ISPLAYER>)
SYSMESSAGELOC -1,501595
ELIF (<ARGO.ISITEM>)
SYSMESSAGELOC -1,501589
ELIF (<ARGO.UID> == <REF1>)
SYSMESSAGELOC -1,501593
ELIF (<ARGO.NPC> == brain_vendor) || (<ARGO.NPC> == brain_banker) || (<ARGO.FLAGS>&STATF_PET) || (<REF1.FLAGS>&STATF_PET) || ((<REF1.TAG0.QUESTS>) && (!(<REF1.ISPLAYER>))) || ((<ARGO.TAG0.QUESTS>) && (!(<ARGO.ISPLAYER>))))
SYSMESSAGELOC -1,501589
ELSE
USEITEM <FINDTYPE.t_musical>
LOCAL.BARDDIFF=<REF1.BARDDIFF <UID>>
LOCAL.BARDDIFF2=<ARGO.BARDDIFF <UID>>
LOCAL.FINALDIFF=<EVAL ((<LOCAL.BARDDIFF>+<LOCAL.BARDDIFF2>)/2)>
FLOAT.CHANCE=<FLOATVAL (55+(2*(((<Provocation>/2)+(<MUSICIANSHIP>/2))-<dLOCAL.FINALDIFF>)))/100>
    IF (<FLOAT.CHANCE> < <FLOATVAL 0.025>)
    FLOAT.CHANCE=<FLOATVAL 0.025>
    ENDIF
    IF (<FLOAT.CHANCE> > <RANDOMDOUBLE>)
    REF1.TAG.PEACED.PLAYER=
    ARGO.TAG.PEACED.PLAYER=
    REF1.EVENTS -E_PEACEMAKED
    ARGO.EVENTS -E_PEACEMAKED
    REF1.ATTACK <ARGO.UID>//dont seem to attack
    ARGO.ATTACK <REF1.UID>//dont seem to attack
    REF1.EVENTS +E_PROVOKED
    ARGO.EVENTS +E_PROVOKED
    REF1.TAG.PROVOKER=<UID>
    ARGO.TAG.PROVOKER=<UID>
    REF1.TIMERF 1,F_CHECK_PROVOKEDDISTANCE
    ARGO.TIMERF 1,F_CHECK_PROVOKEDDISTANCE
    SYSMESSAGELOC -1,501602
    SKILLGAIN Musicianship <EVAL (<MUSICIANSHIP>/10)+1>
    SKILLGAIN Provocation <EVAL (<Provocation>/10)+1>
    SOUND=1418
    REF2=<UID>
        FORCLIENTS 16
        SYSMESSAGELOC -1,1080028,<REF2.NAME>,<REF1.NAME>,<ARGO.NAME>
        ENDFOR
    ELSE
    REF1.ATTACK <UID>
    ARGO.ATTACK <UID>
    SYSMESSAGELOC -1,501599
    SKILLGAIN Musicianship <EVAL (<MUSICIANSHIP>/10)+1>
    SKILLGAIN Provocation <EVAL <LOCAL.FINALDIFF>-40>
    ENDIF
ENDIF

[EOF]
(This post was last modified: 06-24-2015 10:19 PM by tom2008.)
06-24-2015 10:18 PM
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)