Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

Summon Creature create c_man if casted after target an enemy #1070

Closed DavideRei closed 1 year ago

DavideRei commented 1 year ago

.add c_zombie set the war status in the paperdoll dclick on zombie .cast s_summon_creature

image

.cast s_summon_creature now work

if you dclick again the zombie and .cast s_summon_creature another c_man is summoned

canerksk commented 1 year ago

Yes, this is a problem, most likely ACTARG2 is involved. If you want to temporarily solve this problem with a script, you can add the code below. After this problem is fixed, you can remove the script.

// temp solution for #1070 issue
ON=@SKILLMENU
IF (<ARGS> == SM_SUMMON)
    SRC.FLAGS &= ~STATF_WAR
ENDIF

or you can fix it temporarily by adding the following code under the s_summon_creature spell.

[SPELL 40]
DEFNAME=s_summon_creature
..
..
..

ON=@SELECT
// temp solution for #1070 issue
SRC.FLAGS &= ~STATF_WAR
IF (<ACTARG2> == 0)  // block if an entity is not assigned to actarg2.
    SRC.SYSMESSAGE <DEFMSG.msg_summon_invalidtarg>
    RETURN 1
ENDIF
DavideRei commented 1 year ago

The first solution works, thank you. The second solution don't in @select, it blocks summon creature. In @start blocks summon creature if casted after selecting a target.

drk84 commented 1 year ago

Fix sent

DavideRei commented 1 year ago

it works, thank you