Hey guys, I really tried to not ask for help but I just can't seem to get this script working right....
Maybe you guys can give me some pointers on it.
As you may or may not know... I'm coming from the sphere community to Runuo (and I refuse to go back, runuo has so much potential) I just can't seem to figure out some triggers like on=@targon_char or many other functions...
What I want to do with this item script. Is easy really but I just don't know how to make it in C# and I have been trying most of the day. Trying to pinch target codes from others scripts to no prevail.
I want to...
Double click said item.
Have the item open up a target
where you can target a horse
make sure the said horse is tamed or belongs to the player If !(is.mypet) function?
if checks go through target the horse and proceed with the script (multiple forms of a horse would be nice)
Trigger an effect, a sound, and remove said target (the horse)
Then replace the horse with a new custom mobile mount that I scripted.
Make the newly created horse belong to the player
Take away the players karma by -1000 after getting the new custom mobile mount.
and finally... a trigger to check if the target is a horse. if not... display a message and kill the animal(target)
Here is the code in sphere. Hopefully it gives you an idea.
The Class functions I will script in later.
Maybe you guys can give me some pointers on it.
Code:
public override void OnDoubleClick(Mobile from)
{
//from.SendMessage("You have double clicked me!");
from.BeginTarget( 3, false, Server.Targeting.TargetFlags.None, new TargetStateCallback( InternalCallback ), this );
}
As you may or may not know... I'm coming from the sphere community to Runuo (and I refuse to go back, runuo has so much potential) I just can't seem to figure out some triggers like on=@targon_char or many other functions...
What I want to do with this item script. Is easy really but I just don't know how to make it in C# and I have been trying most of the day. Trying to pinch target codes from others scripts to no prevail.
I want to...
Double click said item.
Have the item open up a target
where you can target a horse
make sure the said horse is tamed or belongs to the player If !(is.mypet) function?
if checks go through target the horse and proceed with the script (multiple forms of a horse would be nice)
Trigger an effect, a sound, and remove said target (the horse)
Then replace the horse with a new custom mobile mount that I scripted.
Make the newly created horse belong to the player
Take away the players karma by -1000 after getting the new custom mobile mount.
and finally... a trigger to check if the target is a horse. if not... display a message and kill the animal(target)
Here is the code in sphere. Hopefully it gives you an idea.
Code:
ON=@DCLICK
TARGET
RETURN 1
ON=@TARGON_CHAR
IF ((<SRC.TARG.ISMYPET>) && !(<SRC.TARG.SERIAL>==<SRC.SERIAL>) && (<SRC.TARG.TEVENTS>==e_horses))
IF !(<SRC.SKILLCLASS>==cl_Paladin)
SRC.MESSAGE You are not a Paladin.
SRC.MESSAGE Your attempt to use this on your horse causes it to faint dead away and the backlash takes it's toll.
SRC.TARG.KILL
SOUND=028
SRC.HITS=(<SRC.HITS>-50)
SRC.EFFECT=1,049b1,16,2
SRC.UPDATE
RETURN 1
ELSE
SRC.MESSAGE You watch as your mount glorifies in your sacrificial gift
SRC.KARMA=(<SRC.KARMA>-1000)
SRC.TARG.REMOVE
SRC.NEWITEM=i_pet_horse
SRC.ACT.MORE=Cust_Thessalian
SRC.ACT.MORE2=04e4
SRC.ACT.COLOR=0481
SRC.ACT.NAME=Thessalian
SRC.ACT.BOUNCE
SRC.ACT.DCLICK
SRC.EFFECT=1,049b1,16,2
SOUND=021c
RETURN 1
ENDIF
ELSE
SRC.SYSMESSAGE You are NOT doing that!
ENDIF
RETURN 1
The Class functions I will script in later.