站在食物鏈頂端的男人
- UID
- 1
- 閱讀權限
- 200
- 主題
- 1324
- 帖子
- 2477
- 精華
- 3
- A幣
- 11
- 在線時間
- 4334 小時
- 最後登錄
- 2024-11-22
站長
- 主題
- 1324
- 帖子
- 2477
- 精華
- 3
- 綜合社群主題發文量
- 267
- 電玩社群主題發文量
- 1
- 娛樂社群主題發文量
- 4
- 技術社群主題發文量
- 31
- 閱讀權限
- 200
- 註冊時間
- 2013-1-28
TA的每日心情 | 怒 2024-11-9 23:41 |
---|
簽到天數: 397 天 連續簽到: 1 天 [LV.9]以壇為家II
|
以上資料是從對岸蒐集來的,很多功能都有備註,滿方便實用,歡迎挑看選看
1)兩種不同的NPC
- //第一種,沒有其他狀態的NPC
- function start() {
- cm.sendOk("I am an NPC without a status.");
- cm.dispose();
- }
- //沒有其他狀態NPC的另一種寫法
- function start() {
- cm.sendOk("Here is another example of an NPC without status.");
- }
- function action(mode, type, selection) {
- cm.warp(100000000, 0);
- cm.gainItem(4001126, 1);
- cm.sendOk("See? Here, I warped you and gave you an item without using status.");
- cm.dispose();
- }
- //第二種,帶有狀態的NPC
- var status;
- function start() {
- status = -1;
- action(1, 0, 0);
- }
- function action(mode, type, selection) {
- if (mode == 1) {
- status++;
- }else{
- status--;
- }
- if (status == 0) {
- cm.sendNext("Go ahead and press Next so I can proceed to the next status.");
- } else if (status == 1) {
- cm.sendSimple("Would you like to see how I use status again? \r\n #L0# Yes. #l \r\n #L1# No. #l");
- } else if (status == 2) {
- if (selection == 0) {
- cm.sendOk("Here I am, in another status. As you can see from the script, this window is in status 2.");
- cm.dispose();
- } else if (selection == 1) {
- cm.sendOk("Well, sucks to be you, don't it? This window is also in status 2 :) ");
- cm.dispose();
- }
- }
- }
複製代碼
2)NPC Color codes/Item pictures/etcnpc 文字顏色和物品圖片等等
- #b = Blue text. //藍色文本
- #c[itemid]# Shows how many [itemid] the player has in their inventory.//顯示玩家揹包中有多少個itemid的物品
- #d = Purple text.//紫色文本
- #e = Bold text.//血色文本
- #f[imagelocation]# - Shows an image inside the .wz files.//顯示wz文件中的圖片
- #g = Green text.//綠色文本
- #h # - Shows the name of the player.//顯示玩家名字
- #i[itemid]# - Shows a picture of the item.//顯示物品圖片
- #k = Black text.//黑色文本
- #l - Selection close. //選項關閉,
- #m[mapid]# - Shows the name of the map.//顯示地圖名字
- #n = Normal text (removes bold).//正常文本
- #o[mobid]# - Shows the name of the mob.//顯示怪物名稱
- #p[npcid]# - Shows the name of the NPC.//顯示NPC名字
- #q[skillid]# - Shows the name of the skill.//顯示技能名字
- #r = Red text.//紅色文本
- #s[skillid]# - Shows the image of the skill.//顯示技能圖片
- #t[itemid]# - Shows the name of the item.//顯示物品名稱
- #v[itemid]# - Shows a picture of the item.//顯示物品圖片
- #x - Returns "0%" (need more information on this).//這個不知道是啥
- #z[itemid]# - Shows the name of the item.//顯示物品名稱
- #B[%]# - Shows a 'progress' bar.//顯示進度條
- #F[imagelocation]# - Shows an image inside the .wz files.//顯示wz中的圖片
- #L[number]# Selection open. //開始一個number的選擇
- \r\n - Moves down a line. //換行
- \r = Return Carriage //
- \n = New Line//新的一行
- \t = Tab (4 spaces)
- \b = Backwards //向後一格
複製代碼
3)cm.[commands] cm的各種調用
- dispose
- Ends the conversation with an NPC, allows you to talk to NPCs again.
- //關閉與NPC的對話,這樣你就能再次跟NPC對話
- How to use: cm.dispose();
- sendNext
- Shows a conversation window with a 'Next' button.
- //顯示一段帶有下一項按鈕的對話
- How to use: cm.sendNext("[text]");
- sendPrev
- Shows a conversation window with a 'Prev' (previous) button.
- //顯示一段帶有上一項按鈕的對話
- How to use: cm.sendPrev("[text]");
- sendNextPrev
- Shows a conversation window with a 'Next' and 'Prev' button (see above).
- //顯示一段帶有上一項和下一項的對話
- How to use: cm.sendNextPrev("[text]");
- sendOk
- Shows a conversation window with an 'Ok' button.
- //顯示一段帶有好的按鈕的對話
- How to use: cm.sendOk("[text]");
- sendYesNo
- Shows a conversation window with a 'Yes' and 'No' button, 'No' ends the conversation unless otherwise stated.
- //顯示一段帶有是和否按鈕的對話,否按鈕會關閉對話,除非設置了其他的狀態
- How to use: cm.sendYesNo("[text]");
- sendAcceptDecline
- Shows a conversation window with an 'Accept' and 'Decline' button. 'Decline' ends the conversation unless otherwise stated.
- //顯示一段帶有接受和關閉按鈕的對話,關閉按鈕會關閉對話框,除非設置了其他狀態
- How to use: cm.sendAcceptDecline("[text]");
- sendSimple
- Shows a conversation window with no buttons.
- //顯示一段沒有任何按鈕的簡單對話框
- How to use: cm.sendSimple("[text]");
- sendStyle
- Shows a style-select window.
- //顯示一個帶有風格的對話框
- How to use: cm.sendStyle("[Text]", [variable]); // You'll need to declare the variable in a Var statement.
- warp
- Warps the player to a map.
- //傳送玩家到一個地圖上。第二個參數不知道是啥
- How to use: cm.warp([mapid], [portal]); // Set [portal] as 0 if you want default.
- openShop
- Opens a shop window.
- //打開商店
- How to use: cm.openShop([shopid]);
- haveItem
- Checks if the player has an item (in their inventories or equipped).
- //檢查玩家是否有某個物品
- How to use: cm.haveItem([itemid]);
- gainItem
- Gives the player an item/takes an item from a player.
- //獲取或者刪除玩家的物品,當數量爲負數的時候就是刪除物品
- How to use: cm.gainItem([itemid],[ammount]); // Change [ammount] to -[ammount] to take an item.
- changeJob
- Changes the job of the player.
- //改變玩家的職業
- How to use: cm.changeJob([jobid]);
- getJob
- Finds out what job the player has.
- //獲取玩家當前的職業
- How to use: cm.getJob();
- startQuest
- Starts a quest.
- //開始一個任務
- How to use: cm.startQuest([questid]);
- completeQuest
- Finishes a quest.
- //結束一個任務
- How to use: cm.completeQuest([questid]);
- forfeitQuest
- Forfeits a quest.
- //放棄一個任務
- How to use: cm.forfeitQuest([questid]);
- getMeso
- Finds out how many mesos a player has.
- //獲取玩家的楓幣數量。就是打怪掉的那個幣。
- How to use: cm.getMeso();
- gainMeso
- Gives a player mesos/takes mesos from a player.
- //給與或扣除玩家的楓幣。當數量爲負數時是扣除玩家楓幣。
- How to use: cm.gainMeso([ammount]); // use -[ammount] to take mesos.
- gainExp
- Gives a player exp/takes exp from a player.
- //給與或扣除玩家經驗。負數就是扣除經驗。
- How to use: cm.gainExp([ammount]); // use -[ammount] to take exp.
- getLevel
- Finds out the level of the player.
- //獲取玩家當前等級
- How to use: cm.getLevel();
- teachSkill
- Teaches a player a skill.
- //教玩家技能
- How to use: cm.teachSkill([skillid],[skilllevel],[maxskilllevel]);
- get[Stat]
- Finds out the [Stat] of the player. [Stat] being: HP, MP, STR, DEX, INT, LUK.
- //獲取玩家的屬性:血量,魔法,力量,敏捷,智力,幸運。
- How to use: cm.get[Stat]();
- modifyNX
- Gives/Takes the player nx
- //給與或刪除玩家的點券,對就是拿RMB買的那個點券。
- How to use: cm.gainNX([amount]);
- Make it negative to make it take away.
複製代碼
4)檢查楓幣,捐贈者,物品,管理員,和性別Checking for mesos, items, donator, gm, and gender
- if (cm.getPlayer().isGM()) { //檢查gm
- if (cm.getChar().isDonator() == true) { // checks for donator
- if (cm.getJob().equals(net.sf.odinms.client.MapleJob.BOWMAN)) { // checks for Bowman job (list of jobs in below spoiler)
- if (cm.getLevel() >= 30) { // checks if level is more than or equal to 30.
- if (cm.getChar().getGender() == 0) { // 0 = male, 1 = female
- if (cm.getPlayer().getGender() == 0) { // 0 = male, 1 = female
- if (cm.getMeso() >= amount) { // >= greater than or equal to, <= less than or equal to, == is equal to 檢查玩家是否有足夠的楓幣
- if (cm.haveItem(itemid, amount)) { // checks if the player has a certain amount of an item 檢查玩家是否有一定數量的某物品
- if (cm.getPlayer().getitemQuantity(itemid)); // gets a count of how much a player has of an item 獲得玩家有多少個某個物品。
複製代碼
5)職業代碼 job terms and Ids
- //這個太難翻譯了 只翻譯我看的懂得
- BEGINNER - 0 //新手
- WARRIOR - 100 //戰士
- FIGHTER - 110 //劍客
- CRUSADER - 111 //勇士
- HERO - 112 //英雄
- PAGE - 120 //準騎士
- WHITEKNIGHT - 121 //騎士
- PALADIN - 122 //聖騎士
- SPEARMAN - 130 //槍戰士
- DRAGONKNIGHT - 131 //龍騎士
- DARKKNIGHT - 132 //黑騎士
- MAGICIAN - 200 //法師
- FP_WIZARD - 210 //火毒法師
- FP_MAGE - 211 //火毒巫師
- FP_ARCHMAGE - 212 //火毒魔導師
- IL_WIZARD - 220 //冰雷法師
- IL_MAGE - 221 //冰雷巫師
- IL_ARCHMAGE - 222 //冰雷魔導師
- CLERIC - 230 //牧師
- PRIEST - 231 //祭司
- BISHOP - 232 //主教
- BOWMAN - 300 //弓箭手
- HUNTER - 310 //獵人
- RANGER - 311 //射手
- BOWMASTER - 312 //神射手
- CROSSBOWMAN - 320 //弩弓手
- SNIPER - 321 //遊俠
- CROSSBOWMASTER - 322 //箭神
- THIEF - 400 //盜賊
- ASSASSIN - 410 //刺客
- HERMIT - 411 //無影人
- NIGHTLORD - 412 //隱士
- BANDIT - 420 //俠客
- CHIEFBANDIT - 421 //獨行客
- SHADOWER - 422 //俠盜
- PIRATE - 500 //海盜
- BRAWLER - 510 //拳手
- MARAUDER - 511 //鬥士
- BUCCANEER - 512 //衝鋒隊長
- GUNSLINGER - 520 //火槍手
- OUTLAW - 521 //大副
- CORSAIR - 522 //船長
- MAPLELEAF_BRIGADIER - 800
- GM - 500(v55) / 900(v62+)
- SUPERGM 510(v55) / 910(v62+)
- DAWNWARRIOR1 - 1000
- DAWNWARRIOR2 - 1010
- DAWNWARRIOR3 - 1011
- DAWNWARRIOR4 - 1012
- BLAZEWIZARD1 - 1100
- BLAZEWIZARD2 - 1110
- BLAZEWIZARD3 - 1111
- BLAZEWIZARD4 - 1112
- WINDARCHER1 - 1200
- WINDARCHER2 - 1210
- WINDARCHER3 - 1211
- WINDARCHER4 - 1212
- NIGHTWALKER1 - 1300 //夜行者?
- NIGHTWALKER2 - 1310
- NIGHTWALKER3 - 1311
- NIGHTWALKER4 - 1312
- THUNDERBREAKER1 - 1400
- THUNDERBREAKER2 - 1410
- THUNDERBREAKER3 - 1411
- THUNDERBREAKER4 - 1412
- ARAN1 - 2100
- ARAN2 - 2110
- ARAN3 - 2111
- ARAN4 - 2112
複製代碼
6)各種文本框對應的狀態
- -----------
- sendNext(); & sendOk();
- -----------
- Type = 0
- If end chat - mode = -1
- If next/ok - mode = 1
- -----------
- sendNextPrev();
- -----------
- Type = 0
- If end chat - mode = -1
- If next - mode = 1
- if back - mode = 0
- -----------
- sendYesNo();
- -----------
- Type = 1
- If end chat - mode = -1
- If yes - mode = 1
- If no - mode = 0
- -----------
- sendAcceptDecline();
- -----------
- Type = 12
- If end chat - mode = -1
- If accept - mode = 1
- If decline - mode = 0
- -----------
- sendGetText();
- -----------
- Nothing o____o its something special <3
- -----------
- sendGetNumber();
- -----------
- Type = 3
- If end chat - mode = 0
- if ok - mode = 1
- -----------
- sendSimple();
- -----------
- Type = 4
- If end chat - mode = 0
- if select - mode = 1
複製代碼
7)一些腳本命令
- cm.sendNext("text"); - shows a conversation window with a next button.
- cm.sendPrev("text"); - shows a conversation window with a prev button.
- cm.sendNextPrev("text"); - shows a conversation window with a next and a prev button.
- cm.sendOk("text"); - shows a conversation window with a OK button.
- cm.sendYesNo("text"); - shows a conversation window with a yes and no button.
- //顯示一個帶有接受和拒絕的對話框
- cm.sendAcceptDecline("text"); - shows a conversation window with a accept and decline button.
- cm.sendSimple("text"); - shows a conversation window without buttons.
- //顯示一個讓玩家選擇範圍內數字的窗口
- cm.sendGetNumber("text", defammount, minammount, maxammount) - It makes the player choose a number between minammount and maxammount.
- //顯示一個輸入對話框
- cm.sendGetText("text") - It makes the player be able to type in a text box.
- //
- cm.setGetText("text") - It sets the text in a players NPC text box.
- cm.getText() - It gets the text typed in the text box.
- cm.openShop(SHOPID) - opens a shop by SHOPID
- cm.openNpc(NPCID) - starts a new npc conversation with NPCID
- cm.changeJob(JOBID) - changes the job of the player to JOBID
- cm.getJob() - gets the job of the player
- cm.startQuest(QUESTID) - starts a quest by QUESTID
- cm.completeQuest(QUESTID) - completes a quest by QUESTID
- cm.forfeitQuest(QUESTID) - forfeits a quest by QUESTID
- cm.getMeso() - gets the meso of the player
- cm.gainMeso(NUMBER) - gives mesos to the player by NUMBER
- cm.gainExp(NUMBER) - gives EXP to the player by NUMBER
- cm.getNpc() - gets the current npc
- cm.getFileName() - probably gets a filename.
- cm.getLevel() - gets the level of the player
- cm.unequipEverything() - makes the player unequip everything in equipment
- cm.teachSkill(SKILLID, SKILLLEVEL, MASTERLEVEL) - teaches the player a skill by SKILLID
- cm.getSkill() - gets a skill of the player
- cm.clearSkills() - clears the skills of the player
- cm.getPlayer() - gets the player
- cm.getC() - gets the client
- cm.rechargeStars() - recharges the players stars
- cm.getEventManager(String event) - probably gets an event manager..
- cm.showEffect(String effect) - shows an effect by ID
- cm.playSound(String sound) - plays a sound by ID
- cm.updateBuddyCapacity(ammount) - uodates the buddy capacity to ammount
- cm.getBuddyCapacity() - gets the buddy capacity of a player
- cm.setHair(ID) - sets the hair of a player by ID
- cm.setFace(ID) - sets the face of a player by ID
- cm.setSkin(ID) - sets the skin of a player by ID
- cm.warpParty(MAPID) - warps the party to mapID (good for instances)
- cm.warpRandom(MAPID) - warps to a random portal by MAPID
- cm.spawnMonster(ID, HP, MP, LVL, EXP, Boss?, Undead?, ammount, x, y); - spawns AMMOUNT mob by ID at X,Y with HP, MP, LVL, EXP. Put 1 in boss if you want it to be boss and 1 in undead if you want it to be undead.
- cm.itemQuantity(itemid) - gets quanity of itemid
- cm.createMapleSquad(MapleSquadType) - creates a maplesquad by MapleSquadType
- cm.getSquadMember(MapleSquadType, number) - gets squadmember by number in MapleSquadType
- cm.getSquadState(MapleSquadType) - gets the state of MapleSquadType
- cm.setSquadState(MapleSquadType, state) - sets the state of MapleSquadType
- cm.checkSquadLeader(MapleSquadType) - checks the leader of MapleSquadType
- cm.removeMapleSquad(MapleSquadType) - removes the maplesquad, MapleSquadType
- cm.numSquadMembers(MapleSquadType) - gets the number of squadmembers in MapleSquadType
- cm.isSquadMember(MapleSquadType) - checks wether a player is a squadmember or not in MapleSquadType
- cm.addSquadMember(MapleSquadType) - adds a squadmember to MapleSquadType
- cm.removeSquadMember(MapleSquadType, Char) - removes squadmember from MapleSquadType
- cm.removeSquadMember(MapleSquadType, Char, ban) - removes squadmember from MapleSquadType with ban
- cm.canAddSquadMember(MapleSquadType) - checks if it can add another squadmember into
- cm.removeSquadMember(MapleSquadType, Char) - removes squadmember from MapleSquadType
- cm.warpSquadMembers(MapleSquadType, mapId) - warps squadmembers of MapleSquadType to mapId
- cm.searchItem(ItemName) - searches for ItemName
- cm.makeRing(partner, ringId) - makes a ring to you and your partner bt ringId
- cm.resetReactors() - resets the reactors
- cm.displayGuildRanks() - displays the guild ranks
- cm.sendMessage(Player, Message) - sends a message to player
- cm.gainFame(amount) - gives/takes fame from player by ammount
- cm.maxSkills() - maxes players skills
- cm.getSkillLevel(skillid) - gets skill level by skillid from player
- cm.giveBuff(skillid) - gives a player the buff of skillid
- cm.partyMembersInMap() - checks for the partymembers in the map.
- cm.modifyNx(amount) - modifies the nx of the player
- cm.getTime(type) - get the time of type. type = h/m/s
- cm.addBuddyCapacity(number) - adds the buddycapacity of number
- cm.clearKeys() - sets the keys to deafult
- //延遲傳送
- cm.scheduleWarp(delay, mapid) - warps to mapid in delay
- //地圖傳送倒計時
- cm.startClock(limit, endMap) - starts a clock that will go down to 0 from limit and then warps to endmap
- //獲得玩家名字
- cm.getCharByName(name) - gets char by name
- cm.warpAllInMap(mapid, portal) - warps all in the map to mapid to portal
- cm.createMarriage(partner) - creates marriage with partner
- cm.createEngagement(partner) - creates engagement with partner
- cm.divorceMarriage() - divorces from partner
- cm.changeKeyBinding(key, type, action) - changes key by type by action...
- cm.getEquipById(id) - gets equip by id
- cm.getNpcTalkTimes() - gets how many times som1 have talked to this npc
- cm.setNpcTalkTimes(amount) - sets how many times players have talked to npc by ammount
- cm.makeProItem(ITEMID, NUMBER) - makes an item by ITEMID with NUMBER to each stat (xotic)
- cm.isGuest() - checks wether a player is guest or not
- cm.broadcastMessage(type, message) - broadcasts message by type
- cm.setClan(ClanName) - makes player enter ClanName
- cm.getAllOnlineNamesFromClan(ClanName) - gets all online members names from clan
- cm.getAllOfflineNamesFromClan(ClanName) - gets all offline members names from clan
- cm.getOfflineClanCount(ClanName) - counts how many offline in ClanName
- cm.getJobById(id) - gets job by id
- cm.getPartyMembers() - gets the partymembers in a party
- cm.getSender() - gets the sender of ex. a message
- cm.removeHiredMerchantItem(id) - removes id from hired merchant
- cm.getHiredMerchantMesos() - gets hired merchants mesos
- cm.setHiredMerchantMesos(Number) - sets hired merchants mesos by number
- cm.getHiredMerchantItems() - gets hired merchants items
- cm.sendKeymap(KEY) - sends ? to keymap
- cm.removeAll(ItemID) - Removes all of ItemID
- //inventoryType揹包類型,-1已裝備欄,1揹包裝備欄
- //deleteSolt索引
- //deleteQuantity數量
- cm.removeSlot(inventoryType, deleteSlot, deleteQuantity)
複製代碼
|
|