Назад

Все перечисления\методы\функци и и описания используемые в скриптах Saga

Автор: GreenDay: Дата: 04.30.2010

Enumerations ( Перечисления ):

public enum Functions
{
EverydayConversation = 1,
LocationGuide,
OfficialQuest,
PersonalQuest,
ScenarioQuest,
EventQuest,
Shop = 10,
Kafra, U1,
BookStore,
U2,
EnterShip,
LeaveShip,
EnterTrain,
LeaveTrain,
Smith = 35
};



public enum StepStatus
{
Hiden,
Active,
Completed
};


public enum IconType
{
None,
Personal,
Official,
Both
};



public enum JobType {
NOVICE = 1,
SWORDMAN,
RECRUIT,
THIEF,
ENCHANTER,
CLOWN,
KNIGHT,
ASSASSIN,
SPECIALIST,
SAGE,
GAMBLER,
FALCATA,
FPRSYTHIE,
NEMOPHILA,
VEILCHENBLAU
};


public enum RaceType
{
NORMAN,
ELLR,
DIMAGO
};



Classes (Классы):

ublic class ActorPC : Actor
{
public string userName;
public GenderType sex;
public RaceType race;
public JobType job;
public uint cExp, jExp;
public uint cLevel, jLevel;
public byte str, dex, intel, con, luk, stpoints;
public uint zeny;
public byte save_map;
public float save_x, save_y, save_z;
public string weaponName;
public uint GMLevel;
public List Weapons;
public Dictionary JobLevels;
}


public class Actor
{
public byte mapID, worldID;
public float x, y, z;
public int yaw;
public byte state, stance;
public string name;
}


Scripting Methods (Методы):

AddGoods:

public void AddGoods(int id)

this method is used to add goods to a NPC shop/book store

int id: ID of a item from itemDB


AddButton:

This method is used for adding a function to this npc
AddButton method has these three variant:

public void AddButton(Functions func)
public void AddButton(Functions func, func dele)
public void AddButton(Functions func, Delegate dele, bool hide)

Functions func stands for functions that are supported

Not all functions are currently supported

func dele is the handling method of this function, type of delegate

bool hide , if this button should be hidden in NPC dialog box



AddMobLoot:

public void AddMobLoot(uint mobid, uint QID, uint SID , int ItemID, uint rate)

this method is used for adding a temporary loot for a certain quest

Note:Should be used in OnInit method!

mobid: ID of the Monster, that should drop item
QID: ID of the Quest, that should drop item
SID: ID of the Quest Step, that should drop item
ItemID: ID of the item, that should be dropped.
rate: rate for dropping this item, 10000 for 100%, 5000 for 50%


AddQuest:

public void AddQuest(uint id)

Add a quest to a npc. usually used for mission boards



AddQuestStep:

public void AddQuestStep(uint QID, uint SID, StepStatus s)

Add a Quest Step trigger to a npc



AddStep:

public void AddStep(uint QuestID, uint StepID)

Add one new step to a quest.



public byte CountItem(ActorPC pc, int ItemID)

returns the amount of a item.



public void GiveItem(Actor dActor, int itemID, byte ammount)

Give item to an actor


public void GiveZeny(ActorPC pc, uint amount)

Give money to a player.


public bool IfGotQuest(ActorPC pc, uint id)

Check if a player has got a Quest.


public void QuestCompleted(ActorPC pc, uint QID)

Indicate a player, that a certain Quest is completed.



public void QuestStart(ActorPC pc)

Start a new quest



public void RemoveNavPoint(ActorPC pc, uint QID)

Remove all navigation points of a certain Quest



public void RemoveQuest(ActorPC pc, uint QID)

Remove a Quest


public void Say(string sentence)

Say something


public void SendNavPoint(ActorPC pc,uint QID, uint npcType, float x, float y, float z)

Send a navigation point of a certain Quest


public void SendQuestList(ActorPC pc)

Send the quest list of current Mission board


public void SetReward(ActorPC pc, rewardfunc func)

Set a reward handling method for a certain player


public void SetSavePoint(byte map,float x,float y, float z)

Set the saving point for this Kafra


public void SetScript(uint script)

Set the chatting script for the current npc


public void TakeItem(ActorPC pc, int itemID, byte ammount)

Take item from a player


public void TakeZeny(ActorPC pc, uint amount)

Take money from a player


public void UpdateIcon(ActorPC pc, IconType i)

update the icon shown above of a npc



public void UpdateQuest(ActorPC pc, uint QID, uint SID, StepStatus s)

Update the status of a certain quest step


public void Warp(ActorPC pc, byte mapid)
public void Warp(ActorPC pc, byte mapid, float x, float y, float z)

Warp a player to a certain map(position)




© SagaRO2.RU

Автор: GreenDay: Дата: 04.30.2010

ок сегодня переведу