OK論壇

 找回密碼
 註冊
查看: 2675|回復: 18

JA版自創與新增技能,用物品做出低價購買問題

[複製鏈接]

該用戶從未簽到

發表於 2008-10-20 22:49:24 | 顯示全部樓層 |閱讀模式
請問JA我要怎寫出
增加自創技能或新增技能?

身上攜帶一樣道具,即可到商店用低價購入方式購買東西
身上無這樣道具,則無法使用低價購入方式購買!
這要怎寫阿?

我用一整天研究不出來
  • TA的每日心情
    慵懶
    2011-10-25 10:15 PM
  • 簽到天數: 121 天

    連續簽到: 0 天

    [LV.7]常住居民III

    發表於 2008-10-21 22:18:36 | 顯示全部樓層
    15107,A117,低價買進卡,6,20,0,10,,,,,,,136,,,,,{},{ skill 37,10; }
    15108,B118,高價賣出卡,6,20,0,10,,,,,,,136,,,,,{},{ skill 38,10; }

    這是 我0.97++私服用的方式  你看看 有沒幫到你
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2008-10-22 02:01:25 | 顯示全部樓層
    #2
    他應該是說

    只要身上有該物品,不用裝備在身上

    就能有技能效果

    #1
    這種應該無法辦到

    如果修改成呼叫NPC的方式

    前提:該NPC出售價格你要自己調整

    用此方法說不定能解決
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    慵懶
    2011-10-25 10:15 PM
  • 簽到天數: 121 天

    連續簽到: 0 天

    [LV.7]常住居民III

    發表於 2008-10-22 04:32:20 | 顯示全部樓層
    換種方式來說
    設定一個物品 如  定時炸彈
    12306,time_bomb,定時炸彈,2,1,1,100,,,,,1,2,,,,,,,{ callfunc "ROPPT"; },{},{}
    然後 用 callfunc "ROPPT"; 來定義

    腳本 加入 callfunc NPC
    來啟動 技能  

    function script ROPPT {
    getitem 12306,1;
    itemskill  19,5;
    return;
    }

    這樣 有這物品 就能執行技能
    沒就 沒技能
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2008-10-22 12:26:38 | 顯示全部樓層
    補充#3

    我是知道EA有callshop語法

    不過JA好像沒有這個東西

    是否有替代方案

    我在好好研究
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    無聊
    2012-6-25 09:03 PM
  • 簽到天數: 11 天

    連續簽到: 0 天

    [LV.3]偶爾看看II

    發表於 2008-10-22 12:47:00 | 顯示全部樓層
    請問JA我要怎寫出
    增加自創技能或新增技能?
    我用的ea不過這問題我有研究過 現在還在研究中
    貼一篇xray自創新技能的英文文章給你參考
    我大概懂一點
    但是還在學習
    可以一起研究討論
    [转贴]XRAY 自创新技能(英文)
    Adding Skills (The Bashing-Your-Head-Into-A-Wall Method)
    Disclaimer: This is the result of preliminary testing and is intended only to get people started with adding skills and is by no means complete. Throughout the guide will be several "theories" that I will most likely test, and if it works out or not, then I shall edit the guide as necessary.
    Changelog
    =======
    12/01/2006
    - Added weapon groups
    - Fixed some formatting
    - Added information on selecting skill levels
    12/05/2006
    - Added the tiny bit of information needed by map.h. Thanks to Legionaire for reminding me
    12/20/2006
    - Changed a couple of details regarding map.h
    - Clarified some things regarding skills
    Welcome! Welcome to City 17--er, I mean, welcome to the basic Skills guide. What I'm gonna do is go thru some basic steps that you need to carry out in order to add a new skill to the game using XRay 10.5.2+, so if there's no questions so far, let's get going.
    The Beginning - Getting What You Need
    'k, there's a few little things you're gonna need before you can go ahead with all of this:
    1) The RO client. You just plain NEED this in order to do anything.
    2) XRay itself (Download from the fantastic sticky at the top of these forums )
    3) The eAthena source code (Go here to find multiple pages of information on how to get files from the SVN. Windows users should do a search for "TortoiseSVN" to get started )
    4) A compiler. There's tons of free ones. I recommend either Dev-C++ (which comes with MinGW, a Windows port of the GNU Compiler Collection (gcc)), or Visual C++ Express, a free version of Visual C++ 2005 from Microsoft (but it requires you to "register it" via a Windows Live! account after 30 days; it uses a hardware hash, so each code is unique to each computer you plan to install it on).
    5) An idea. This is probably the most important step. If you've got nothin', you're wasting your time. Seriously, don't even bother if you can't come up with anything.
    The Middle - What Needs To Be Done
    'k, now that you have everything you need at your disposal (you DO have everything, right?), it's time to get to work. We'll start off with the easy stuff--screwing around with the XRay client.
    As far as XRay goes, the only file we're interested in for this tutorial is ability_tab.txt, so open it up and you should be presented with something like this:
    Quote:Zero Skill
    NV_BASIC
    SM_SWORD
    <lots of skills>
    <lots more skills>
    SA_ELEMENTGROUND
    SA_ELEMENTFIRE
    SA_ELEMENTWIND
    Now then, to add a new skill, we simply add it to the bottom of this list, right after SA_ELEMENTWIND.
    Theory: The list is by no means completely filled, and in fact there are several gaps from what I've noticed where a person could insert their skills. However, one must be cautious, as each skill is appropriately numbered inside the source. These spots may also be reserved by the client for some unknown reason. I'll have to test it out.
    Next, go to your data folder (or extract the files from your GRFs) and open up skilldesctable.txt. Copy any skill description (preferably a short one) and paste it at the end of the file, renaming the skill name to your skill. Do the same with the skillnametable.
    If you want to allow your players to select a specific level of the skill, you need to add the information to the file "leveluseskillspamount.txt". The format is as follows:
    Quote:SKILL_NAME#
    SPAMOUNT#
    SPAMOUNT#
    (etc. etc.)
    SPAMOUNT#
    @
    where you replace SPAMOUNT with the amount of SP you use for that level. So if all you want to do is allow users to change the level, set them all to the same number.
    Important Step: In order to prevent resource errors (which will crash the client after a while), you MUST add placeholders for both sprites and texture icons for your new skills.
    For Icons-> Go to your data folder and browse to this directory (create new directories as necessary): texture\&Agrave;‾&Agrave;&uacute;&Agrave;&Icirc;&Aring;&Iacute;&AElig;&auml;&Agrave;&Igrave;&frac12;&ordm;\item. Add a .bmp to this directory, 24x24, and name it the same as your skill (in my example, it would be "asc_bladeflurry.bmp").
    For Shortcut Keys-> Go to your data folder and browse to this directory (create new directories as necessary): sprite\&frac34;&AElig;&Agrave;&Igrave;&Aring;&Ucirc;. Add a .spr and an associating .act file to this directory with the same name as your skill. I'd recommend taking the icon you make for the above step and whipping up a quick little sprite with it (Sprite Editors can be found on the eAthena forums).
    The Creamy Centre - Editing the Source Code
    Now that the client is prepped, we can add our skill to the server source code. Fire up your IDE or a text editor (Editplus is good), and open up these files:
    Quote:skill.h
    skill.c
    From here, the additional files you need to open will vary depending on what you wish to do.
    - If your intention is to add a castable attack skill (such as Bash, or Storm Gust), you'll need to open battle.c and insert additional code into there. You'll also need to consult this file if you're adding certain passive skills, such as masteries.
    - If you're adding a status-affecting skill (Two-Hand Quicken, Critical Explosion, etc), you'll need to open status.c, status.h, and map.h for editing. If your castable skill inflicts a status effect (Storm Gust's Freeze effect), then you'll also have to add it in here as well. Certain passive buffs also require the editing of these files.
    Note: There may be other files that need to be taken into account, but they should all be located inside the map-server project. If any additional files need to be edited, let me know which ones, as well as the type of skill you were creating.
    I'm not going to go thru all the nitty-gritty details here, since explaining how to edit the source is beyond the scope of this guide. What I will say though is this:
    1) Add your skill name to skill.h, at the approximate location your skill is listed in ability_tab.txt. If you don't know what number your skill is, go to ability_tab.txt and count by hand. Use the source code as a reference if necessary; many IDEs (such as Visual C++ Express) will tell you what value each skill in the enumerator is at, so it should be easy to get a good reference.
    2) Add your skill name to the array skill_names[] in skill.c, which is located near the top. All the skills are listed in alphabetical order here, but you should be able to add it anywhere in the array.
    3) If you're adding a status-affecting skill, you need to add your status effect to the enumerator at the top of status.h (if it's like Critical Explosion), and you also have to add it to status.c, in the section with all the add_sc() and set_sc() function calls. The format used for the status-change enumerator is SC_NAMEOFSKILL.
    4) If adding any new statuses, you need to open up map.h and increase the size of the MAXSTATUSCHANGE constant; otherwise, the map-server will yell at you for going out of the status array's bounds.
    Once you've edited the source, compile and if there aren't any errors, consider yourself golden.
    The Omega - Setting Up The Rest Of The Server
    This is really simple, actually. You need to edit the following files:
    Quote:skill_cast_db.txt
    skill_castnodex_db.txt
    skill_db.txt
    skill_nocast_db.txt
    skill_require_db.txt
    skill_tree.txt
    skill_unit_db.txt
    The format of these files is something I'm not 100% familiar with. However, the structure is explained inside each file.
    Some skills require specific types of weapons, and these requirements are part of the skill's listing in skill_require_db. The weapon groups are:
        * 0) Bare Fists (aka anything)
        * 1) Daggers
        * 2) One-Handed Swords
        * 3) Two-Handed Swords
        * 4) One-Handed Spears
        * 5) Two-Handed Spears
        * 6) One-Handed Axes
        * 7) Two-Handed Axes
        * 8) Maces
        * 9) Unknown (It seems to be unused)
        * 10) Staves
        * 11) Bows
        * 12) Fist Weapons
        * 13) Instruments
        * 14) Whips
        * 15) Books
        * 16) Katars
        * 17) Revolvers
        * 18) Rifles
        * 19) Shotguns
        * 20) Gatling Guns
        * 21) Grenades
        * 22) Huuma (Don't know what these are)
    Note that these currently only apply to active skills; there's no entries for passive skills in any file except for skill_tree and skill_db; I assume that passive skills' requirements are defined in the source.
    Basically, you need to add your skill to these files. Not all of them, just some of them. For example, my Blade Flurry skill only needed to be added to skill_db, skill_tree, skill_require_db (to add conditions; I only wanted Blade Flurry to be usable with Katar-type weapons, which is weapon group 16), and skill_cast_db. You use the skill's ID to add it, not the name.
    Leftovers - How It All Looks
    Well, if you've been tinkering with it and had some kind of success, you should have something like this:

    At this point, the skill is fully usable in the game, and players should be able to learn it once they meet the required conditions set out in your skill tree.
    So you should have at least a general idea of how to add a skill. If there's any questions, feel free to leave a reply and I'll try to answer it. If you want to contribute something too, please do so and I'll try and incorporate it into this guide.
    Thank you.


    最後...有些地方變成表情符號...我也不願意
    只好自己想辦法看了=口=
    抱歉

    [ 本帖最後由 camille11307 於 2008-10-22 12:48 PM 編輯 ]

    本帖子中包含更多資源

    您需要 登錄 才可以下載或查看,沒有帳號?註冊

    x
    回復 支持 反對

    使用道具 舉報

    該用戶從未簽到

     樓主| 發表於 2008-10-22 16:52:38 | 顯示全部樓層
    #4
    我想問問
    我看過你的
    12306,time_bomb,定時炸彈,2,1,1,100,,,,,1,2,,,,,,,{ callfunc "ROPPT"; },{},{}
    這是EA版的物品方法?
    ROPPT
    我在JA指令表沒看到這樣東西耶說

    #5
    callshop天殺有跟我說過
    確實是EA才有
    天殺說有這樣東西則很容易做出
    = =可惜JA沒有

    #6
    英文版教學
    Orz我天生英文呆子
    看不太懂在寫什麼!!!
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2010-8-8 12:04 AM
  • 簽到天數: 5 天

    連續簽到: 0 天

    [LV.2]偶爾看看I

    發表於 2008-10-22 17:22:17 | 顯示全部樓層

    回覆 7樓的 海神夜 的帖子

    我想大概要設定的文件有

    xray文件名稱ability_player_tab.txt

    db文件
    skill_cast_db.txt
    skill_castnodex_db.txt
    skill_db.txt
    skill_nocast_db.txt
    skill_require_db.txt
    skill_tree.txt
    skill_unit_db.txt


    看到這篇我就想說來試試

    是成功用出技能在技能欄了

    不過沒有效果

    一起繼續努力加油吧
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    慵懶
    2011-10-25 10:15 PM
  • 簽到天數: 121 天

    連續簽到: 0 天

    [LV.7]常住居民III

    發表於 2008-10-22 17:48:58 | 顯示全部樓層
    原帖由 海神夜 於 2008-10-22 04:52 PM 發表
    #4
    我想問問
    我看過你的
    12306,time_bomb,定時炸彈,2,1,1,100,,,,,1,2,,,,,,,{ callfunc "ROPPT"; },{},{}
    這是EA版的物品方法?
    ROPPT
    我在JA指令表沒看到這樣東西耶說

    #5
    callshop天殺有跟我說過
    確實 ...


    roppt 是 npc 名字  
    隨你設啊

    item.db 物品 也可隨意設  就後面 效果{} 要加 callfun xxx


    這樣 就能啟動腳本 的funtion NPC

    這是 語法   ja 可用啦
    回復 支持 反對

    使用道具 舉報

    該用戶從未簽到

     樓主| 發表於 2008-10-22 18:15:51 | 顯示全部樓層
    #9
    我想說奇怪
    因為物品格式應該是
    558,Chocolate,巧克力,0,500,,20,,,,,1000333311,2,,,,,,{ itemheal 1,1; },{}
    可是你的卻是
    12306,time_bomb,定時炸彈,2,1,1,100,,,,,1,2,,,,,,,{ callfunc "ROPPT"; },{},{}

    我測試了你的方法
    item:
    2044,Nereus,VIP卡,2,200,80,2,,,,,1000333311,2,,,,,,{},{ callfunc "ROPPT"; }
    ROPPT文件:
    function script ROPPT {
    getitem 32044,1;
    itemskill 37,10,1;
    結論沒有效果
    您的方法則是
    itemskill命令
    作用:用物品使用技能
    --------------------------------------------------------------------------------
    格式: itemskill <skillid>,<skilllv>,<str>[,<flag>];
    --------------------------------------------------------------------------------
    參數:  
    <skillid> 技能ID(數值類型)
    <skilllv> 技能Lv(數值類型)
    <str> 物品名字(字符串類型)
    <flag> 檢查(數值類型。0=有,1=沒有。省略時為1)
    --------------------------------------------------------------------------------

    說明: 指定的道具名引發技能,詠唱中不能使用。
    <flag>為1時表示無條件發動。<flag>為0時則檢查發動技能的條件。
    return;
    }
    #8
    成功用出技能在技能欄了
    不過沒有效果

    =ˇ=|||那對我也沒用處阿!
    因為沒效果
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    慵懶
    2011-10-25 10:15 PM
  • 簽到天數: 121 天

    連續簽到: 0 天

    [LV.7]常住居民III

    發表於 2008-10-22 18:41:25 | 顯示全部樓層
    我測試了你的方法
    item:
    2044,Nereus,VIP卡,2,200,80,2,,,,,1000333311,2,,,,,,{},{ callfunc "ROPPT"; }
    ROPPT文件:
    function script ROPPT {
    getitem 32044,1;
    itemskill 37,10,1;

    這裡 可能筆誤

    試試 這樣  應該 可以 ja++93 到97 都可用

    function       script     ROPPT {
    getitem 32044,1;
    itemskill 37,10,"VIP卡";

    return;
    }


    [ 本帖最後由 bn5656 於 2008-10-22 07:11 PM 編輯 ]
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2019-8-18 04:57 PM
  • 簽到天數: 2148 天

    連續簽到: 1 天

    [LV.Master]伴壇終老

    發表於 2008-10-22 18:42:41 | 顯示全部樓層
    發 錯 地 方 。
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情

    2010-8-8 12:04 AM
  • 簽到天數: 5 天

    連續簽到: 0 天

    [LV.2]偶爾看看I

    發表於 2008-10-22 18:44:37 | 顯示全部樓層

    回覆 10樓的 海神夜 的帖子

    所以說要繼續

    努力研究嘛~~~
    回復 支持 反對

    使用道具 舉報

    該用戶從未簽到

     樓主| 發表於 2008-10-22 18:46:52 | 顯示全部樓層

    回覆 11樓的 bn5656 的帖子

    =  =我貼錯了
    編號是

    item:
    32044,Nereus,VIP卡,2,200,80,2,,,,,1000333311,2,,,,,,{},{ callfunc "ROPPT"; }
    ROPPT文件:
    function script ROPPT {
    getitem32044,1;
    itemskill 37,10,1;

    這樣才對

    #12
    我要上課咩
    今天三節都電腦課
    所以大多都會在網路上
    哈哈哈
    回復 支持 反對

    使用道具 舉報

  • TA的每日心情
    開心
    2021-12-17 05:30 AM
  • 簽到天數: 237 天

    連續簽到: 1 天

    [LV.7]常住居民III

    發表於 2008-10-22 18:59:21 | 顯示全部樓層

    回覆 14樓的 海神夜 的帖子

    我建議你還是改成裝備吧-----如此也比較簡單

    看樣子此種方法應該是無解/?

    不然就換EA/?
    回復 支持 反對

    使用道具 舉報

    您需要登錄後才可以回帖 登錄 | 註冊

    本版積分規則

    Archiver|手機版|小黑屋|OK討論區

    GMT+8, 2024-5-15 02:08 PM , Processed in 0.071367 second(s), 20 queries , Gzip On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回復 返回頂部 返回列表