メソッド一覧


/***********************************************************************
* This is standard quest supplied functions

********************************************************************/


Event {
  // wait for event type        : タフコ・ニョ ケ゚サア錝・ア箒ルクイ
   // supported type : hear    : ヌ・アクヌネ タフコ・ニョ hear
   static function void waitFor(integer event_type);
   static function void timedWaitFor(integer event_type, integer expireTime);
   // get event result        : タフコ・ニョ ー皺弴ヲ スコニョクオタクキホ ゲア・
   // tip: save to another var    : アラカァアラカァ コホク」チ・クサー・コッシ。 タ惕衂リシュ セオーヘ.
   static function string result(integer event_type);
   static function void waitIfRunning(string questName);
};

String {
  // check whether two strings are matched : caseinsensitive
   // ケョタレソュ コウ : ソオケョタレステ エ・メケョタレ ケォステヌヤ
   static function boolean  match(string a, string b);
   // check whether two strings are matched : casesensitive
   // ケョタレソュ コウ : ソオケォタレ エ・メケョタレ アクコミヌヤ
   static function boolean casematch(string a, string b);
   // check whether stringA contains stringB
   // テケケー ケョタレソュタフ オホケ・ケョタレソュタサ ニヤヌマエツチ・ナラスコニョ
   static function boolean contains(string a, string b);
   // return joined string. e.g) "this" + "that" -> "thisthat"
   // オホ ケョタレソュタサ ヌヤト」 ーヘタサ クョナマ e.g) "ウネ" + "ウネ" -> "ウネウネ"
   static function string join(string a, string b);
   // return splitted string with given delimiter.
   // front position is 0 and post position is 1
   // ケョタレソュソ。シュ チヨセ錝・オィクョケフナヘタヌ ケョタレソュタサ テ゚テ・
   // positionタフ 0タフク・タ゚カュ セユタヌ ーヘタサ, 1タフク・オレタヌ ーヘタサ クョナマ
   static function string split(string delim, integer position, string source);
   // make string to integer. e.g) "1233" -> 1233
   // シタレヌ・ツタヌ ケョタレソュタサ シタレキホ ククオ邏ル. e.g) "1233" -> 1233
   static function integer toInteger(string a);
   // return length of string
   // ケョタレソュタヌ ア貘フクヲ クョナマヌヤ
   static function integer length(string a);

  static function string addObjectiveSuffix(string str);
   static function string addSubjectiveSuffix(string str);
   static function string addDescriptiveSuffix(string str);
   static function string addConjunctiveSuffix(string str);
};

Integer {
  // make string from integer. e.g) 1234 -> "1234"
   // シタレソ。シュ ケョタレソュタサ ククオ邏ル. e.g) 1234 -> "1234"
   static function string toString(integer i);
};

Util {
  static function void log(string content);
   // return randomized number within given range
   // チヨセ錝・ケ・ァウサソ。シュ キ」エ シタレ クョナマ
   static function integer random(integer from, integer to);
   // suspend quest for given seconded time
   // チヨセ錝・ステー」ククナュ チ、チ・ エワ エワタァエツ テハ:
   static function void sleep(integer sec);
   // return real world clock
   static function integer getTime();
   // return formatted real world clock string. man strftime to overview format
   static function string getTimeString(string format);
   // return game world tick count
   static function integer getTick();
   static function integer getTotalSeconds(integer tick);
   static function integer getYear(integer tick);
   static function integer getMonth(integer tick);
   static function integer getDay(integer tick);
   static function integer getWday(integer tick);
   static function integer getHour(integer tick);
   static function integer getMinute(integer tick);
   static function integer getSecond(integer tick);
   // return formatted game world time string. man strftime to overview format itself
   // but only %c, %Y, %y, %m %d, %H, %h, %M, %S, %p are supported
   static function string getTickString(string format);
   static function integer getNeighborX(integer x, integer direction);
   static function integer getNeighborY(integer y, integer direction);
   static function integer hexToDec(string hexString);
   static function string decToHex(integer dec);
   static function string getStringFor(string stringKey);

  static function string filterCurse(string userText);
   static function void notifyToAllUser(string str);

  static function integer getRealNationType();

  static function void canUseShoutScroll();
};

Machine {
  static function string getWholeArgs();
   static function integer getArgCount();
   static function string getArgAt(integer index);
   static function void setBooleanReturn(boolean result);
   static function void setIntegerReturn(integer result);
   static function void setStringReturn(string result);
   static function void setSavable();
   static function void exit();
   static function integer getDomainNumber();
};

Game {
  static function integer getNatureValue(integer attackNature, integer defenseNature);
   static function integer getThac0(integer class, integer level);
   static function integer getThac0_NPC(integer level);
   static function integer safetyPointAdjustment(integer dex);
   static function integer hitProbabilityAdjustment(integer str);
   static function integer damageAdjustment(integer str, integer dex);
};

/***********************************************************************
* Game dependent functions 
 * HIERARCHY NOTE:
 *   If A is B, A can call all functions in B
 *   If A is B, A can be used wherever B is needed
 *   Example) User is Creature. so User can call all functions in Creature
 *            as well as can be used where Creature is needed.
 *
 *   Object : root class
 *
 *   Visible            is Object
 *   World            is Object
 *   Nation            is Object
 *   Clan            is Object
 *   Guild             is Object
 *   Action            is Object
 *   Casted            is Object
 *   ActionInventory        is Object
 *   CarryingItemInventory    is Object
 *   EntrustedItemInventory    is Object
 *   CastedSpellInventory    is Object
 *   ClientController        is Object
 *   Container            is Object
 *   Rank            is Object
 *   Point            is Object
 *   Location            is Object
 *   Rectangle            is Object
 *   Castle            is Object
 *   WaitingRoomList        is Object
 *
 *   Creature            is Visible
 *   Monster            is Creature
 *   Guardian            is Monster
 *   Merchant            is Monster
 *   User            is Creature
 *   Item            is Visible
 *   Reactor            is Visible
 *
 *   StringArray        is Container
 *   IntegerArray        is Container
 *
 *   Machine            have nothing to do with Object
 *   Menu            have nothing to do with Object
 *   Event            have nothing to do with Object
 *   String            have nothing to do with Object
 *   Integer            have nothing to do with Object
 *   Util            have nothing to do with Object

********************************************************************/

Object {
  function string getTypeName();
   function void giveQuestTo(string questName, object target, string argumentString);
   function integer getId();
};

Visible {
  static function object at(integer x, integer y);
   static function object named(string name);

  function boolean isCreature();
   function boolean isReactor();
   function boolean isPortal();

  function string getName();
   function string getDesc();
   function object getWorld();
   function integer getX();
   function integer getY();
   function void setX(integer x);
   function void setY(integer y);
   function integer getTile();
   function void setTile(integer tile);

  function boolean isInSight(object target);

  function boolean hasIntValue(integer index);
   function integer getIntValue(integer index);
   function void setIntValue(integer index, integer value);

  function string getStringValue(integer index);
   function integer getStringValueSize();
   function string getStringValueRandom(boolean bRemove);
   function void setStringValueRandom(string value);
   function void setStringValue(integer index, string value);
   function void resetStringValue(integer index);
};

Creature {
  static function object create(string name);
   // check wheter Trigger running given quest
   // suspended quest チ゚ソ。 スヌヌ猊マー・タヨエツ ーヘタフ タヨエツチ・return
   function boolean hasQuest(string quest_name);
   // suspend quest チ゚ソ。 ーュチヲキホ チヲーナ
   function boolean endQuest(string quest_name);
   // suspend action of creature
   // タレオソタクキホ ソフエツ ーナ クキア・
   function void suspend();
   // resume action of creature
   // タレオソタクキホ ソモ ヌ譱・
   function void resume();
   function boolean isDead();
   function boolean isAlive();
   function void show();
   function void hide();
   function integer getMaxInvenWeight();
   function void setMaxInvenWeight(integer bonus);
   // make trigger say
   // Trigger ー。 クサヌマーヤ ククオ・
   function void say(string word_to_say);
   function void sayTo(string word_to_say, object listener);
   // make trigger be moved to direction : north: "n", south: "s" northwest: "nw", ...
   // チヨセ錝・ケ貮簑クキホ タフオソステナーア・
   function void move(integer dir);
   // make trigger take some motion
   // クヌ コクソゥチヨーヤ ヌマア・
   function void motion(integer motion, integer delay);
   // show effect
   function void effect(integer effect, integer delay);
   function void effectTo(object target, integer effect, integer delay);
   function void successAttackEffectTo(object target, integer damage, integer sound, integer attackMotion, integer attackEffect, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedEffectWhen, boolean bForcelyShowDamageBar);
   function void failAttackEffectTo(object target, integer attackMotion, integer attackEffect);
   function void successAttackEffectFromObjectToObject(object target, integer damage, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackedEffectWhen, boolean bForcelyShowDamageBar, boolean bIgnoreSameMotion);
   function void failAttackEffectFromObjectToObject(object target, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void successAttackEffectFromObjectToVictimPoint(object target, integer damage, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackedEffectWhen, boolean bForcelyShowDamageBar, boolean bIgnoreSameMotion);
   function void failAttackEffectFromObjectToVictimPoint(object target, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void successAttackEffectFromAttackerPointToObject(object target, integer damage, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackedEffectWhen, boolean bForcelyShowDamageBar, boolean bIgnoreSameMotion);
   function void failAttackEffectFromAttackerPointToObject(object target, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void successAttackEffectFromAttackerPointToVictimPoint(object target, integer damage, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackedEffectWhen, boolean bForcelyShowDamageBar, boolean bIgnoreSameMotion);
   function void failAttackEffectFromAttackerPointToVictimPoint(object target, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void successAttackEffectFromObjectToFixedPoint(object point, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackEffectWhen, boolean bIgnoreSameMotion);
   function void failAttackEffectFromObjectToFixedPoint(object point, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void successAttackEffectFromAttackerPointToFixedPoint(object point, integer sound, integer attackMotion, integer attackEffect, integer attackDelay, integer attackEffectWhen, integer attackedMotion, integer attackedEffect, integer attackedDelay, integer attackEffectWhen, boolean bIgnoreSameMotion);
   function void failAttackEffectFromAttackerPointToFixedPoint(object point, integer attackMotion, integer attackEffect, integer delay, boolean bIgnoreSameMotion);
   function void damageEffectTo(object target, integer damage, integer delay);
   function void healEffectTo(object target, integer hp, integer delay);
   // return level of trigger
   // Trigger タヌ キケコァ クョナマ
   function integer getLevel();
   // set tigger's level
   // Trigger タヌ キケコァ シシニテ
   function void setLevel(integer lev_to_set);
   // return trigger's gender : MALE:0, FEMALE:1, NEUTRAL:2
   // ニョクョーナタヌ シココークョナマ : ウイタレ:0, ソゥタレ:1, チ゚シコ:2
   function integer getGender();
   function integer getDirection();
   function void setDirection(integer direction);
   // set trigger's gender
   // ニョクョーナタヌ シココーシシニテ
   function void setGender(integer gender);
   // get trigger's hp
   // trigger タヌ hp ゲセニソネ
   function integer getHP();
   // set trigger's hp
   // trigger タヌ hp シシナ゙
   function void setHP(integer hp);
   function integer getMP();
   function void setMP(integer mp);
   function integer getSP();
   function void setSP(integer sp);
   function integer getSkillPoint();
   function void setSkillPoint(integer sp);
   function integer getMaxHP();
   function void setMaxHP(integer hp);
   function integer getMaxMP();
   function void setMaxMP(integer mp);
   function integer getMaxSP();
   function void setMaxSP(integer sp);
   function integer getOrgMaxHP();
   function void setOrgMaxHP(integer hp);
   function integer getOrgMaxMP();
   function void setOrgMaxMP(integer mp);
   function integer getOrgMaxSP();
   function void setOrgMaxSP(integer sp);
   function integer getMaxSkillPoint();
   function void setMaxSkillPoint(integer sp);
   function integer getGold();
   function void setGold(integer gold);
   function integer getInt();
   function integer getStr();
   function integer getHack();
   function integer getStab();
   function integer getCon();
   function integer getDex();
   function integer getAgi();
   function integer getWis();
   function integer getLuck();
   function void setInt(integer value);
   function void setStr(integer value);
   function void setHack(integer value);
   function void setStab(integer value);
   function void setCon(integer value);
   function void setDex(integer value);
   function void setAgi(integer value);
   function void setWis(integer value);
   function void setLuck(integer value);
   function void addInt(integer value);
   function void addStr(integer value);
   function void addHack(integer value);
   function void addStab(integer value);
   function void addCon(integer value);
   function void addDex(integer value);
   function void addAgi(integer value);
   function void addWis(integer value);
   function void addLuck(integer value);
   function void subInt(integer value);
   function void subStr(integer value);
   function void subHack(integer value);
   function void subStab(integer value);
   function void subCon(integer value);
   function void subDex(integer value);
   function void subAgi(integer value);
   function void subWis(integer value);
   function void subLuck(integer value);
   function integer getOrgInt();
   function integer getOrgStr();
   function integer getOrgHack();
   function integer getOrgStab();
   function integer getOrgCon();
   function integer getOrgDex();
   function integer getOrgAgi();
   function integer getOrgWis();
   function integer getOrgLuck();
   function void setOrgInt(integer value);
   function void setOrgStr(integer value);
   function void setOrgHack(integer value);
   function void setOrgStab(integer value);
   function void setOrgCon(integer value);
   function void setOrgDex(integer value);
   function void setOrgAgi(integer value);
   function void setOrgWis(integer value);
   function void setOrgLuck(integer value);
  function integer getAttackNature();
   function void setAttackNature(integer nature);
   function integer getDefenseNature();
   function void setDefenseNature(integer nature);
   function integer getNature();
   function void setNature(integer value);

  function void addNatureResist(integer nature, integer value);
   function void subNatureResist(integer nature, integer value);
   function void setNatureResist(integer nature, integer value);
   function integer getNatureResist(integer nature);
   function void setOrgNatureResist(integer nature, integer value);
   function integer getOrgNatureResist(integer nature);

  // check whether trigger is user
   // trigger ー。 タッタ惕ホチ・ニヌエワ
   function boolean isUser();
   // check whether trigger is Monster
   // trigger ー。 クコナヘタホチ・ニヌエワ
   function boolean isMonster();
   function boolean isMerchant();
   function boolean isPet();
   function boolean isGuardian();
   // update trigger's attribute values
   // NOTE : quest does not update attributes though you change them
   //        since, too many update make network load and server load
   //       So you should call explitcitly this function
   // trigger タヌ シモシコタサ セ・タフニョ
   // NOTE : trigger シモシコタコ ケルキホケルキホ セ・タフニョ オヌチ・セハエツエル. タフヌヤシヲ
   //      コメキッセ゚ククヌムエル
   function boolean isBuilder();
   function void updateEquipAt(integer part);
   function void updateAttr();
   function void broadcastAbnormalState(integer abnormalStateId, integer skillId, integer byOther, integer value);
   function void broadcastDamage(integer damage);
   // update trigger's shape. shape is appearance
   // NOTE : quest does not update user shapes though you change them
   // trigger タヌ ソワセ鄲サ セ・タフニョ
   // NOTE : trigger タヌ シモシコタコ ケルキホケルキホ セ・タフニョ オヌチ・セハウュエル. タフヌヤシヲ
   //       コメキッセ゚ククヌムエル.
   function void updateShape();

  function object getSkillActionInventory();
   function object getCastedSpellInventory();
   function object getCarryingItemInventory();

  function void castNamed(string actionName);
   function void castNamedWithDuration(string actionName, integer duration);
   function void castObjected(object actionOrCastedObject);

  function integer defaultDamageCalculation(object victim, integer damage, integer attackType, integer attackNature);

  function void rememberAttacker(object enemy);
   function boolean canAttack(object enemy);
   function object getDefaultTarget();

  function integer getSpellAvoidRate();
   function void setSpellAvoidRate(integer rate);
   function integer getAttackAvoidRate();
   function void setAttackAvoidRate(integer rate);
   function integer getAttackHitRate();
   function void setAttackHitRate(integer rate);
   function integer getAttackBonusDamage();
   function void setAttackBonusDamage(integer damage);

  function integer getDefence();
   function void setDefence(integer ac);
   function void addDefence(integer ac);
   function void subDefence(integer ac);
   function integer getOrgDefence();
   function void setOrgDefence(integer ac);
   function integer getDamageClass();
   function void setDamageClass(integer dc);
   function void addDamageClass(integer dc);
   function void subDamageClass(integer dc);
   function integer getMagicResist();
   function void setMagicResist(integer mac);
   function void addMagicResist(integer mac);
   function void subMagicResist(integer mac);
   function integer getOrgMagicResist();
   function void setOrgMagicResist(integer mac);
   function integer getDamRole();
   function void setDamRole(integer damRole);
   function integer getHitRole();
   function void setHitRole(integer hitRole);
   function integer getRegen();
   function void setRegen(integer value);
   function integer getMregen();
   function void setMregen(integer value);
   function integer getStaminaRegen();
   function void setStaminaRegen(integer value);

  function integer getMoveMotionMultiplier();
   function void setMoveMotionMultiplier(integer val);
   function void addMoveMotionMultiplier(integer val);
   function void subMoveMotionMultiplier(integer val);

  function void message(string message, integer type);

  function void teleportTo(object location);
   function void recall(string userName);
   function void recallAt(string userName, integer worldNum);
   function void approachTo(string userName);

  function boolean isAbsolutelyImmortal();
   function boolean isPhysicallyImmortal();
   function boolean isMagicallyImmortal();
   function void setImmortal(integer immortal_mode);
   function void unsetImmortal(integer immortal_mode);

  // item related creature functions
   function boolean doesHaveItemAt(integer slot);
   function integer doesHaveItemClassNamed(string className);
   function boolean doesEquipItemClassNamed(string className);
   function boolean doesEquipPart(integer part);
   function string getDescAtSlot(integer slot);        
   function string getDescAtPart(integer part);        
   function string getClassNameAtSlot(integer slot);    
   function string getDescAtDepositSlot(integer slot);        
   function string getClassNameAtDepositSlot(integer slot);    
   function string getClassNameAtPart(integer part);
   function boolean equipClassNamed(string className);
   function boolean equipAtInvenSlot(integer slot);
   function boolean unequipAtEquipPart(integer part, boolean destroyAfterUnequip);
   function boolean useClassNamed(string className);
   function boolean useAtInvenSlot(integer slot);
   function void identifyItemAtInvenSlot(integer slot);
   function void identifyItemClassNamed(string itemName);
   function integer getEmptyInvenSlotCount();
   function integer getAvailInvenWeight();
   function integer getEmptyDepositSlotCount();
   function integer getTileAtSlot(integer slot);
   function integer getPriceAtSlot(integer slot);
   function integer getWeightAtSlot(integer slot);
   function integer getNumberAtSlot(integer slot);
   function integer getEnduranceAtSlot(integer slot);
   function boolean isIdentifiedAtSlot(integer slot);
   function boolean canDepositItemAtSlot(integer slot);
   function integer getTileAtDepositSlot(integer slot);
   function integer getPriceAtDepositSlot(integer slot);
   function integer getWeightAtDepositSlot(integer slot);
   function integer getNumberAtDepositSlot(integer slot);
   function integer getEnduranceAtDepositSlot(integer slot);
   function boolean isIdentifiedAtDepositSlot(integer slot);
   function integer getFirstItemSlot();
   function integer getNextItemSlot(integer slot);
   function integer getFirstDepositItemSlot();
   function integer getNextDepositItemSlot(integer slot);

  function void addItemClassNamed(string className, integer number);
   function void removeItemClassNamed(string className, integer number);
   function void removeItemEndureZeroAtPart(integer part);
   function boolean unequipItemBelowEndureAtPart(integer part, integer ratio);

  function void setLastHitter(object hitter);
   function void setAttacker(object hitter);
   function object getLastHitter();

  function void setState(integer state, boolean flag);
   function boolean isState(integer state);

  function integer getWalkSpeed();
   function void setWalkSpeed(integer speed);
   function integer getRunSpeed();
   function void setRunSpeed(integer speed);

  function void setEventTerminator(string eventid, integer minute, string script, boolean bShowTimer);
   function void resetEventTerminator(string eventid);
   function void resetEventTerminator2(string eventid, boolean bSuccess);
   function void modifyEventTerminator(string eventid, integer newdurationMin);
   function boolean hasShownTerminator();

  function void increaseTalkFlag();
   function void decreaseTalkFlag();

  function boolean canBeCasted(integer state);
   function void setDamageUp(integer up);

  function void setNightSight(integer value);
   function integer getNightSight();
};

User {
  function void setExp(integer exp);
   function void addExp(integer exp);
   function void subExp(integer exp);
   function integer getExp();
   function string getMasterId();

  function string getIpString();
   function integer getFD();

  function object getEntrustedItemInventory();

  function integer getAvailGold();
   function integer getAvailBalance();
   // reurn trigger's user class : game dependent value
   // ニョクョーナタヌ タッタ愰ャキ。スコクヲ クョナマ : ーヤタモクカエル エルクァ
   function integer getClass();
   // set trigger's user class
   // ニョクョーナタヌ タッタ愰ャキ。スコクヲ シシニテ
   function void setClass(integer class);
   // get trigger's path
   // trigger タヌ タッタ・ニミスコ セ錞ネ
   function integer getPath();
   // set trigger's path
   // trigger タヌ タッタ・ニミスコ タ惕・

  • 最終更新:2016-08-12 13:35:56

このWIKIを編集するにはパスワード入力が必要です

認証パスワード