Hey guys... 12 year sphere scripter here who decided to finally make the plundge to runuo. I am in the proccess of converting a 14 year old sphere server to runuo and I am pretty new to C# but I was hoping I could get a little help with this one....
I am trying to convert this section of sphere code here...
Now, I seem to have the basic of the item down (that took me a good while for my first day trying to learn C#) but I can't seem to figure out how I would call the karma and undead triggers like I was able to on sphere.
Here is what I have thus far....
Again, i'm not even sure if i'm doing it right. I wanna try my best to convert all of my scripts but when I have a basic understanding of the triggers I need I will be in alot better shape.
I am trying to convert this section of sphere code here...
Code:
[ITEMDEF Paladin_Sword]
//Paladin's Weapon
ID=i_sword_broad
TYPE=t_weapon_sword
DAM={19 35}
SPEED=55 //edited by Thynro
SKILL=Swordsmanship
REQSTR=25
WEIGHT=3
SKILLMAKE= BLACKSMITHING 100.0, ARMSLORE 100.0, MAGERY 50.0
RESOURCES=10 i_ingot_frost
ON=@Create
NAME=Sword of Truth
ATTR=attr_magic|attr_newbie
HITPOINTS=paladin_sword_hits
color=0482
MOREP=0 800 0
CATEGORY=TFL Additions
SUBSECTION=Paladin
DESCRIPTION=Sword of Truth
ON=@EQUIP
f_paladin_equip
ON=@DAMAGE
//Karma -9000 or higher in the negative field, or hitting an undead npc activate
IF (<SRC.NPC>==BRAIN_UNDEAD) || (<SRC.KARMA> < -9000))
SRC.DAMAGE={10 18}
SRC.EFFECT=3,037b9,6,15,1
SRC.SOUND=snd_SPELL_POISON
RETURN 0
ENDIF
Now, I seem to have the basic of the item down (that took me a good while for my first day trying to learn C#) but I can't seem to figure out how I would call the karma and undead triggers like I was able to on sphere.
Here is what I have thus far....
Code:
using System;
using Server;
namespace Server.Items
{
public class SwordofTruth : Broadsword
{
[Constructable]
public SwordofTruth()
{
Name = "Sword of Truth";
Weight = 3.0;
Hue = 0x0482;
LootType = LootType.Blessed;
Attributes.WeaponDamage = 35;
Attributes.WeaponSpeed = 55;
}
public SwordofTruth(Serial serial) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
Again, i'm not even sure if i'm doing it right. I wanna try my best to convert all of my scripts but when I have a basic understanding of the triggers I need I will be in alot better shape.