Jump to content

kyleflow

Advanced members
  • Content Count

    70
  • Joined

  • Last visited

Community Reputation

12 Neutral

About kyleflow

  • Rank
    Pirate

Recent Profile Visitors

439 profile views
  1. 1. refer code related to ship attribute function Ship_ExAttrCheck ( cha_role , ship_role ) if ship_role == nil then LG("luascript_err" , "Ship_ExAttrCheck ship index as null" ) return 0 end if cha_role == nil then LG ( "luascript_err" , " function Ship_ExAttrCheck :cha_role as null " ) return -- ship_mnatk_final = Ship_BSMnatk ( ship_role ) --船只基本最小攻击 -- ship_mxatk_final = Ship_BSMxatk ( ship_role ) --船只基本最大攻击 -- ship_adis_final = Ship_BSAdis ( ship_role ) --船只基本攻击距离 -- ship_cspd_final = Ship_BSCspd ( ship_role ) --炮弹基本飞行速度 -- ship_aspd_final = Ship_BSAspd ( ship_role ) --炮弹基本攻击间隔 -- ship_crange_final = Ship_BSCrange ( ship_role ) --炮弹基本爆炸范围 -- ship_def_final = Ship_BSDef ( ship_role ) --船只基本防御 -- ship_resist_final = Ship_BSResist ( ship_role ) --船只基本抵抗 -- ship_mxhp_final = Ship_BSMxhp ( ship_role ) --船只基本最大耐久 -- ship_hrec_final = Ship_BSHrec ( ship_role ) --船只基本耐久回复速度 -- ship_srec_final = Ship_BSSrec ( ship_role ) --船只基本补给消耗速度 -- ship_mspd_final = Ship_BSMspd ( ship_role ) --船只基本移动速度 -- ship_mxsp_final = Ship_BSMxsp ( ship_role ) --船只基本最大补给值 else lv = GetChaAttr ( ship_role , ATTR_LV ) job = GetChaAttr ( cha_role , ATTR_JOB ) sta = GetChaAttr ( cha_role , ATTR_STA ) ship_mnatk_final = Boat_plus_MNATk ( lv , Ship_Mnatk_final ( cha_role , ship_role ) ) --船只最终最小攻击 ship_mxatk_final = Boat_plus_MXATk ( lv , Ship_Mxatk_final ( cha_role , ship_role ) ) --船只最终最大攻击 ship_adis_final = Ship_Adis_final ( cha_role , ship_role ) --船只最终攻击距离 ship_cspd_final = Ship_Cspd_final ( cha_role , ship_role ) --炮弹最终飞行速度 ship_aspd_final = math.floor ( 100000 / Ship_Aspd_final ( cha_role , ship_role ) ) --炮弹最终攻击间隔 ship_crange_final = Ship_Crange_final ( cha_role , ship_role ) --炮弹最终爆炸范围 ship_def_final = Boat_plus_def ( lv , Ship_Def_final ( cha_role , ship_role ) ) --船只最终防御 ship_resist_final = Ship_Resist_final ( cha_role , ship_role ) --船只最终抵抗 ship_mxhp_final = Boat_plus_Mxhp ( lv , Ship_Mxhp_final ( cha_role , ship_role ) ) --船只最终最大耐久 ship_hrec_final = Ship_Hrec_final ( cha_role , ship_role ) --船只最终耐久回复速度 ship_srec_final = Ship_Srec_final ( cha_role , ship_role ) --船只最终补给消耗速度 ship_mspd_final = Boat_plus_Mspd ( lv , Ship_Mspd_final ( cha_role , ship_role ) ) --船只最终移动速度 ship_mxsp_final = Ship_Mxsp_final ( cha_role , ship_role ) --船只最终最大补给值 end --SystemNotice( cha_role , "Min Attack"..ship_mnatk_final) --ship_mnatk_final = Boat_plus_MNATk ( lv , ship_mnatk_final) --ship_mxatk_final = Boat_plus_MXATk ( lv , ship_mxatk_final) --ship_def_fina = Boat_plus_DEF ( lv , ship_def_final) --ship_mxhp_final = Boat_plus_Mxhp ( lv , ship_mxhp_final) --ship_mspd_final = Boat_plus_Mspd ( lv , ship_mspd_final) -- SetCharaAttr(lv, ship_role, ATTR_LV ) --[[赋值船只lv]]-- SetCharaAttr(job, ship_role, ATTR_JOB ) --[[赋值船只职业]]-- SetCharaAttr(sta, ship_role, ATTR_STA ) --[[赋值船只精神]]-- SetCharaAttr(ship_mnatk_final, ship_role, ATTR_MNATK ) --[[赋值最终mnatk]]-- SetCharaAttr(ship_mxatk_final, ship_role, ATTR_MXATK ) --[[赋值最终mxatk]]-- SetCharaAttr(ship_adis_final, ship_role, ATTR_ADIS ) --[[赋值最终adis]]-- SetCharaAttr(ship_cspd_final, ship_role, ATTR_BOAT_CSPD ) --[[赋值最终船只炮弹飞行速度]]-- SetCharaAttr(ship_aspd_final, ship_role, ATTR_ASPD ) --[[赋值最终船只攻击速度]]-- SetCharaAttr(ship_crange_final, ship_role, ATTR_BOAT_CRANGE ) --[[赋值最终船只炮弹爆炸范围]]-- SetCharaAttr(ship_def_final, ship_role, ATTR_DEF ) --[[赋值最终船只防御]]-- SetCharaAttr(ship_resist_final, ship_role, ATTR_PDEF ) --[[赋值最终船只抵抗]]-- SetCharaAttr(ship_mxhp_final, ship_role, ATTR_MXHP ) --[[赋值最终船只最大耐久]]-- SetCharaAttr(ship_hrec_final, ship_role, ATTR_HREC ) --[[赋值最终船只耐久回复速度]]-- SetCharaAttr(ship_srec_final, ship_role, ATTR_SREC ) --[[赋值最终船只补给消耗速度]]-- SetCharaAttr(ship_mspd_final, ship_role, ATTR_MSPD ) --[[赋值最终船只移动速度]]-- SetCharaAttr(ship_mxsp_final, ship_role, ATTR_MXSP ) --[[赋值最终船只最大补给值]]-- SetCharaAttr( 1 , ship_role , ATTR_FLEE ) --船只不具备闪避属性,始终初始化为1 end function Ship_ExAttrSet ( cha_role , ship_role ) end function Lifelv_Up ( cha_role ) --生活等级提升 local life_ap = GetChaAttr ( cha_role , ATTR_LIFETP ) life_ap = life_ap + 1 SetCharaAttr( life_ap , cha_role , ATTR_LIFETP ) end function Saillv_Up ( cha_role ) --航海等级提升 end function Resume ( role ) local role_type = ChaIsBoat ( role ) local srec = GetChaAttr ( role , ATTR_SREC ) local sp = GetChaAttr ( role , ATTR_SP ) local mxsp = GetChaAttr ( role , ATTR_MXSP ) local hrec = GetChaAttr ( role , ATTR_HREC ) if hrec < 0 then LG ( "resume_err" , "role = " , GetChaName (role) , "HP recovery rate lower than 0" ) LG ( "resume_err" , "role_hrec_statec = " , GetChaAttr ( role , ATTR_STATEC_HREC) , "role_hrec_statev = ", GetChaAttr ( role , ATTR_STATEV_HREC) ) LG ( "luascript_err" , "function Resume: character HP recovery rate less than 0" ) return end local hp = GetChaAttr ( role , ATTR_HP ) local mxhp = GetChaAttr ( role , ATTR_MXHP ) if role_type == 1 then --船只resume --Rem_State_NOSEA ( role ) -- SystemNotice (role,"enter ship recover") if hp <= 0 then LG ( "luascript_err" , "function Resume: Character in dead status" ) return end cha_role = GetMainCha ( role ) if sp <= 0 then BickerNotice ( role , "No more fuel! The ship is being damaged every moment! Get to the nearest Harbor now!" ) hrec = hrec - 0.025 * mxhp srec = 0 end sp = math.max ( 0 , sp - srec ) hp = math.min ( mxhp , hp + hrec ) local ship_lv = GetChaAttr ( role , ATTR_LV ) local ship_exp = GetChaAttr ( role , ATTR_CEXP ) local boatexpup_count = GetBoatCtrlTick ( role ) if ( boatexpup_count - math.floor ( boatexpup_count / 5 ) * 5 ) == 4 then a = 1 else a = 0 end boatexpup_count = boatexpup_count + 1 if boatexpup_count >= 500 then boatexpup_count = 0 end SetBoatCtrlTick ( role , boatexpup_count ) -- SetAttrChangeFlag( role) if ship_lv <= 30 and ship_exp <= 1000 then -- if ship_lv <= 50 and ship_exp <= 1000 then -- SystemNotice (role,"enter ship expup") if a == 1 then -- SystemNotice (role,"ship_expadd = " ..ship_expadd) -- SystemNotice (role,"ship_exp = " ..ship_exp) local ship_expadd = math.floor ( math.random ( 1, 3 ) + math.max ( 0 , ( 2 - ship_lv /10 ) ) ) -- local ship_expadd = math.floor ( math.random ( 50, 150 ) ) ship_exp = ship_exp + ship_expadd -- SystemNotice (role,"after resume ship_exp = " ..ship_exp) SystemNotice (role,"Ship EXP gained:" ..ship_expadd) SetCharaAttr (ship_exp ,role , ATTR_CEXP ) -- ship_exp = GetChaAttr ( role , ATTR_CEXP ) -- SystemNotice (role,"1 after resume ship_exp = " ..ship_exp) end end -- cha_hp = math.min ( Mxhp ( cha_role ) , Hp ( cha_role ) + Hrec ( cha_role ) ) cha_sp = math.min ( Mxsp ( cha_role ) , Sp ( cha_role ) + Srec ( cha_role ) ) SetCharaAttr ( sp , role , ATTR_SP ) SetCharaAttr ( hp , role , ATTR_HP ) -- SetCharaAttr ( cha_hp , cha_role , ATTR_HP ) SetCharaAttr ( cha_sp , cha_role , ATTR_SP ) -- SyncBoat ( role, 4 ) else if hp <= 0 then LG ( "luascript_err" , "function Resume: Character in dead status" ) return end local Elf_SkillHpResume = 0 local Elf_SkillSpResume = 0 if mxhp ~= hp then Elf_SkillHpResume = ElfSkill_HpResume ( role ) end if mxsp ~= sp then Elf_SkillSpResume = ElfSkill_SpResume ( role ) end hrec = hrec + Elf_SkillHpResume srec = srec + Elf_SkillSpResume sp = math.min ( mxsp , sp + srec ) hp = math.min ( mxhp , hp + hrec ) SetCharaAttr ( hp , role , ATTR_HP ) SetCharaAttr ( sp , role , ATTR_SP ) end end 2. No. Ship only affected by buff item. speed buff, skill cast from ship, ship invisibility, ship repair and etc. 3. Also refer code. 4. Both fairy and char exp are not calculated.
  2. Not that I remember of editing. Here is the original code that I get from shared files. function Creat_Item(item, item_type, item_lv, item_event) --[[创建道具实例]]-- --LuaPrint("Enter function Creat_Item()".."\n") --LG("item", "Enter function Creat_Item() type = ", item_type, " lv = ", item_lv, " event = ", item_event) item_event = item_event item_type = item_type item_lv = item_lv Reset_item_add() -- 清空 item_add local i = 0 local Num = 0 if item_event==NPC_SALE then --NPC买卖 ??????????????NPC_SALE定义成宏了吗 在哪里 --LG("item", "item creation type--", "NPC Trade", "\n") Npc_Sale( item_type, item_lv , item_event) -- i = SetItemForgeParam ( item , 1 , Num ) -- if i == 0 then -- LG( "Creat_Item" , "set forging content failed" ) -- end SetItemForgeParam_Npc_Sale ( item , Num ) elseif item_event==MONSTER_BAOLIAO then --怪物暴料 --LG("item", "item creation type--", "Monster Drop List", "\n") Monster_Baoliao( item_type, item_lv , item_event) SetItemForgeParam_MonsterBaoliao ( item , Num ) elseif item_event == PLAYER_HECHENG then --玩家合成 --LG("item", "item creation type--", "Player combine", "\n") Player_Hecheng( item_type, item_lv , item_event) SetItemForgeParam_PlayerHecheng ( item , Num ) elseif item_event == PLAYER_XSBOX then --新手宝箱 --LG("item", "item creation type--", "Newbie Chest", "\n") Player_XSBox( item_type, item_lv , item_event) local Num = GetItemForgeParam ( item , 1 ) --32位信息数据 local Part1 = GetNum_Part1 ( Num ) --Get Num Part 1 到 Part 7 local Part2 = GetNum_Part2 ( Num ) local Part3 = GetNum_Part3 ( Num ) local Part4 = GetNum_Part4 ( Num ) local Part5 = GetNum_Part5 ( Num ) local Part6 = GetNum_Part6 ( Num ) local Part7 = GetNum_Part7 ( Num ) --local SkillType = 3 --要增加的 Skill 类型 --local SkillNum = 5 --要增加的Skill 编号 if item_type == 1 then Part1 = 1 Part2 = 1 Part3 = 1 end if item_type == 2 then Part1 = 1 Part2 = 2 Part3 = 1 end if item_type == 3 then Part1 = 1 Part2 = 2 Part3 = 1 end if item_type == 4 then Part1 = 1 Part2 = 3 Part3 = 1 end if item_type == 7 then Part1 = 1 Part2 = 8 Part3 = 1 end if item_type == 9 then Part1 = 1 Part2 = 8 Part3 = 1 end Num = SetNum_Part3 ( Num , Part3 ) Num = SetNum_Part2 ( Num , Part2 ) Num = SetNum_Part1 ( Num , Part1) SetItemForgeParam ( item , 1 , Num ) -- AddItemEffect(role , item , 1 ) ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- elseif item_event == PLAYER_CCFSBOXA then --磁场发生器a Player_CCFSBoxA( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXB then --磁场发生器b Player_CCFSBoxB( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXC then --磁场发生器c Player_CCFSBoxC( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXD then --磁场发生器d Player_CCFSBoxD( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXE then --磁场发生器e Player_CCFSBoxE( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXF then --磁场发生器f Player_CCFSBoxF( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXG then --磁场发生器g Player_CCFSBoxG( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXH then --磁场发生器h Player_CCFSBoxH( item_type, item_lv , item_event) elseif item_event == PLAYER_CCFSBOXI then --磁场发生器i Player_CCFSBoxI( item_type, item_lv , item_event) elseif item_event == PLAYER_ZSITEM then --紫色装备 Player_ZSitem( item_type, item_lv , item_event) elseif item_event == PLAYER_HSSR then --黑市商人 Player_HSSR( item_type, item_lv , item_event) elseif item_event == PLAYER_HSSRA then --黑市商人 Player_HSSRA( item_type, item_lv , item_event) elseif item_event >= QUEST_AWARD_1 then --任务获取 -- LG("item_1", "item creation type--", "Quest obtained", "\n") Quest_Award( item_type, item_lv , item_event) SetItemForgeParam_QuestAward ( item , Num , item_event ) else --LG("item", "item creation reason does not exist, event = ", item_event) item_add.cnt = 0 end --LG("item","item_add.cnt = " , item_add.cnt,"\n", "item_add.attr[1][1] = ", item_add.attr[1][1], "item_add.attr[1][2] = ", item_add.attr[1][2],"\n", "item_add.attr[2][1] = ", item_add.attr[2][1], "item_add.attr[2][2] = ", item_add.attr[2][2],"\n", "item_add.attr[JOB_TYPE_SHUISHOU][1] = ", item_add.attr[3][1], "item_add.attr[JOB_TYPE_SHUISHOU][2] = ", item_add.attr[3][2],"\n", "item_add.attr[4][1] = ", item_add.attr[4][1], "item_add.attr[4][2] = ", item_add.attr[4][2],"\n", "item_add.attr[5][1] = ", item_add.attr[5][1], "item_add.attr[5][2] =", item_add.attr[5][2],"\n") --LG("item", "End Creat_Item()") --LuaPrint("Out function Creat_Item()".."\n") return item_add.cnt, item_add.attr[1][1], item_add.attr[1][2], item_add.attr[2][1], item_add.attr[2][2], item_add.attr[3][1], item_add.attr[3][2], item_add.attr[4][1], item_add.attr[4][2], item_add.attr[5][1], item_add.attr[5][2], item_add.attr[6][1], item_add.attr[6][2], item_add.attr[7][1], item_add.attr[7][2] end
  3. -------------------------------------------------------------------------- -- -- -- -- -- skilleffect.lua -- -- -- -- -- -------------------------------------------------------------------------- print( "Loading Calculate Files:" ) print( "------------------------------------" ) print( "Loading SkillEffect.lua" ) dofile(GetResPath("script\\calculate\\exp_and_level.lua")) dofile(GetResPath("script\\calculate\\JobType.lua")) dofile(GetResPath("script\\calculate\\AttrType.lua")) dofile(GetResPath("script\\calculate\\Init_Attr.lua")) dofile(GetResPath("script\\calculate\\ItemAttrType.lua")) dofile(GetResPath("script\\calculate\\functions.lua")) dofile(GetResPath("script\\calculate\\AttrCalculate.lua")) dofile(GetResPath("script\\calculate\\ItemEffect.lua")) dofile(GetResPath("script\\calculate\\variable.lua")) dofile(GetResPath("script\\calculate\\Look.lua")) dofile(GetResPath("script\\calculate\\forge.lua")) dofile(GetResPath("script\\calculate\\ItemGetMission.lua")) dofile(GetResPath("script\\calculate\\mods\\pkodev.contract.lua")) -- mods item contract CheckDmgChaNameTest = {} CheckDmgChaNameTest [0] = "Re℡↘紊╃懒" CheckDmgChaNameTest [1] = "Carsise" CheckDmgChaNameTest [2] = "I am rubbish" CheckDmgChaNameTest [3] = "CG mao mao" CheckDmgChaNameTest [4] = "Chief mate against" BOSSXYSJ = {} BOSSXYSJ[979] = 1 BOSSXYSJ[980] = 12 BOSSXYSJ[981] = 6 BOSSXYSJ[982] = 4 BOSSXYSJ[983] = 12 BOSSXYSJ[984] = 16 BOSSXYSJ[985] = 16 BOSSXYSJ[986] = 12 BOSSXYSJ[987] = 4 BOSSXYSJ[988] = 4 BOSSSJSJ = {} BOSSSJSJ[979] = 8 BOSSSJSJ[980] = 1 BOSSSJSJ[981] = 6 BOSSSJSJ[982] = 4 BOSSSJSJ[983] = 12 BOSSSJSJ[984] = 16 BOSSSJSJ[985] = 16 BOSSSJSJ[986] = 12 BOSSSJSJ[987] = 4 BOSSSJSJ[988] = 4 BOSSTJSJ = {} BOSSTJSJ[979] = 8 BOSSTJSJ[980] = 1 BOSSTJSJ[981] = 6 BOSSTJSJ[982] = 4 BOSSTJSJ[983] = 12 BOSSTJSJ[984] = 16 BOSSTJSJ[985] = 16 BOSSTJSJ[986] = 12 BOSSTJSJ[987] = 4 BOSSTJSJ[988] = 4 BOSSXZSJ = {} BOSSXZSJ[979] = 12 BOSSXZSJ[980] = 12 BOSSXZSJ[981] = 16 BOSSXZSJ[982] = 16 BOSSXZSJ[983] = 12 BOSSXZSJ[984] = 4 BOSSXZSJ[985] = 1 BOSSXZSJ[986] = 6 BOSSXZSJ[987] = 4 BOSSXZSJ[988] = 4 BOSSAYSJ = {} BOSSAYSJ[979] = 12 BOSSAYSJ[980] = 12 BOSSAYSJ[981] = 16 BOSSAYSJ[982] = 16 BOSSAYSJ[983] = 12 BOSSAYSJ[984] = 4 BOSSAYSJ[985] = 1 BOSSAYSJ[986] = 6 BOSSAYSJ[987] = 4 BOSSAYSJ[988] = 4 This is the code. I also try the alternate method of TriggerAction(1, MakeContract) but still unable to make it work. @V3ct0r
  4. Can't make the mods work. This is my 2 iteminfo 7338 Contract n0184 10130005 0 0 0 0 0 0 99 0 0 0 0 0 0 0 0 1 1 0 0 -1 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_PKOdevContract 0 0 0 0,0 0 0 After completion you will receive a reward! 0 7339 Contract-1 n0184 10130005 0 0 0 0 0 0 99 0 0 0 0 0 0 0 0 1 1 0 0 -1 0 -1 0 0 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_1Contract 0 0 0 0,0 0 0 After completion you will receive a reward! 0 The iteminfo ID I input into the pkodev.contract.lua is 7338 and the other ID with the function below for contract is in 7339. function ItemUse_1Contract( role, Item) local ret, item, pos = contract.create(role, 76, 10 ) end What happen is when I click the item ID with 7339, I get the Item in 7338. When I click 7338, I get random item but mostly fairy of luck which listed in the reward. No contract is made on both iteminfo. What I did wrong here? @V3ct0r
  5. That's a useful tips. Thanks. will try to do so later ! for now the glow is working as I intended with new individual ring but I will try to use the suggestion debug step to check also.
  6. I tried yesterday and able to make the glow work by ensuring the skilleff and variable.lua have the same ID number but the difference is the skilleff ID is a new one.. 240 which is the end limit. And I did try to use ID 239 for information bank and made a new set glow with it but it will not work. I check the STATE related to the ID is not used in any function and yet unable to make it work. I also notice making the condition pertain 2 condition is the limit.. I can't go beyond Dina_xx_ID with 2 other condition for it to work. Changing the limit with mods by V3ctor also is not working and he did mentioned for skilleff, u need some skill to change the hex files which i don't have. Lastly, can you share the glow ID u used for the rings u shown in the video. I want to try it
  7. I made it right by using the method i mention above which is making item for individual job class. The only issue is that, I can't seem to introduce new glow other than the existing one. Do you guys know which post have details for new glow for set? I want to make cool thunder glow if possible. Saw it in some other PS.
  8. Update @V3ct0r, Tried the code but still not working somehow. Any other ideas that you think would help? Should I make new STATE and individual ring for low lvl ring to use the same glow effect?
  9. Thank you so much bro. I will try it now !
  10. I have a code, the ring glow is working for crusader class only but unable to work for other class. It is like the code is not checking for the job requirement. here is the code. can anyone give any other input ? local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local Dina_x3 = GetEquipItemP(role,5) local Dina_x3_ID = GetItemID(Dina_x3) local job = GetChaAttr(role, ATTR_JOB) -- 7325 is the forsaken ring and 825 is the kylin armor. if ((Dina_xl_ID == 2578 or Dina_xl_ID == 7325) and (Dina_x2_ID == 2820 or Dina_x2_ID == 825 )) and job == 9 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif ((Dina_xl_ID==2577 or Dina_x1_ID == 7325) and (Dina_x2_ID==2817 or Dina_x2_ID == 825)) and job == 8 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif ((Dina_xl_ID==2579 or Dina_x1_ID == 7325) and (Dina_x2_ID==2823 or Dina_x2_ID == 825)) and job == 12 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif ((Dina_xl_ID==2580 or Dina_x1_ID == 7325) and (Dina_x2_ID==2826 or Dina_x2_ID == 825)) and job == 16 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif ((Dina_xl_ID==2581 or Dina_x1_ID == 7325) and (Dina_x2_ID==2832 or Dina_x2_ID == 825)) and job == 14 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif ((Dina_xl_ID==2582 or Dina_x1_ID == 7325) and (Dina_x2_ID==2829 or Dina_x2_ID == 825)) and job == 13 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) --elseif Dina_xl_ID == 7325 and Dina_x3_ID == 7326 then -- local statelv = 1 -- local statetime = 3600 -- AddState ( role , role , STATE_BBRING7 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end --local statelv_bbring7 = GetChaStateLv ( role , STATE_BBRING7 ) -- 45 ring -- if statelv_bbring7~=0 then -- RemoveState ( role , STATE_BBRING7 ) -- end end
  11. @DangThao not working. But I figured that I able to create new state and everything related to that stats such like skilleff and etc. it worked.. but i need multiple item for it also
  12. I edit the existing script for 85 ring glow and adding a new set of accessories to made it use back the 85 glow but with job class prerequisite and new item ID corresponding to the ring and neck location. The glow wont show up. Anyone knows why ? function cha_timer(role, freq, time) local resume_freq = 5 local now_tick = GetChaParam(role, 1) local is_role_living = -1 SetChaParam(role, 1, now_tick + freq * time) --hp回复 if math.mod(now_tick, resume_freq) == 0 and now_tick > 0 then JianYuKa(role ,now_tick) ZhongShenTaoZhuang(role,now_tick) if is_role_living == -1 then is_role_living = IsChaLiving(role) end if is_role_living == 1 then Resume(role) end end ---Glow 85--- local Dina_xl = GetEquipItemP(role,8) local Dina_xl_ID= GetItemID (Dina_xl) local Dina_x2 = GetEquipItemP(role,2) local Dina_x2_ID= GetItemID (Dina_x2) local Dina_x3 = GetEquipItemP(role,5) local Dina_x3_ID = GetItemID(Dina_x3) local job = GetChaAttr(role, ATTR_JOB) if Dina_xl_ID == 2577 and (Dina_x2_ID == 2817 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif Dina_xl_ID==2578 and (Dina_x2_ID==2820 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif Dina_xl_ID==2579 and (Dina_x2_ID==2823 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif Dina_xl_ID==2580 and (Dina_x2_ID==2826 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif Dina_xl_ID==2581 and (Dina_x2_ID==2832 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif Dina_xl_ID==2582 and (Dina_x2_ID==2829 or Dina_x2_ID == 825) then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end if job == 8 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then -- xjd hahahaha local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING1 , statelv , statetime ) elseif job == 9 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING2 , statelv , statetime ) elseif job == 12 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING3 , statelv , statetime ) elseif job == 16 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING4 , statelv , statetime ) elseif job == 14 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING5 , statelv , statetime ) elseif job == 13 and Dina_x1_ID == 7325 and Dina_x3_ID == 7326 then local statelv = 1 local statetime = 3600 AddState ( role , role , STATE_BBRING6 , statelv , statetime ) else local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 ) if statelv_bbring1~=0 then RemoveState ( role , STATE_BBRING1 ) end local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 ) if statelv_bbring2~=0 then RemoveState ( role , STATE_BBRING2 ) end local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 ) if statelv_bbring3~=0 then RemoveState ( role , STATE_BBRING3 ) end local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 ) if statelv_bbring4~=0 then RemoveState ( role , STATE_BBRING4 ) end local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 ) if statelv_bbring5~=0 then RemoveState ( role , STATE_BBRING5 ) end local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 ) if statelv_bbring6~=0 then RemoveState ( role , STATE_BBRING6 ) end end end
  13. kyleflow

    Create a Quest

    I did able to do it and make the quest appear in the said npc but somehow when i kill a mobs for the quest, an error appeared and i did read in this post said that the id is too big and need to be smaller. I did change that but somehow it still fail to work. So i'm stuck.
  14. Work like a charm thanks to you @Jonathan
×
×
  • Create New...