Jump to content

kyleflow

Advanced members
  • Content Count

    230
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by kyleflow

  1. There is actually a release of plug and play if you search the forum but not like other private server that you do not need to install anything, this one need to install things but all the item and instruction is provided by the community released.
  2. I'm saying I dont know about it since I never come across any code related to the game that I need to use it. Does it seem appropriate that I dont know of it existance ? I check through the code but unable to find any with Lua that function or simply I dont know how to find it. Tried my best to understand but unable to. Also I'm not actually gaining anything from the code if its working, simply something that should be implement since as the game development tweak mobs and item sets, the role of a support healer lose it purpose. Hope anyone who knows, please do contribute.
  3. Based on the code example made by other people (simpler form),the declaration for your code should be a header only or inside the function of SHPF? &updateall code, I dont have it.The code for lua_all shared here is not working as expected. Could you assist more on this ?
  4. No sadly. I dont have the exact step. Not sure also about DB
  5. Which VS that would not break the compilation? Can you list step by step what you do and how yo do it
  6. Step to do ? Using VS 2022 Community to open the TOP.sln. Compile Utility Compile AudioSDL Compile Engine Compile Client Is that all? where do I find the compiled files?
  7. function lua_all(role, cmd) local packet = GetPacket() local CMD_MM_DO_STRING = 4015 WriteCmd(packet, CMD_MM_DO_STRING) WriteDword(packet, 0) WriteString(packet, cmd) SendPacket(role, packet) end Still error
  8. Anyone making guide for this? Never work with CO
  9. I took your advice and changes a bit the code suggested above and here the code. First I put the code of lua_all load in the same files of serialize.lua so that it load before other files load. Here is the code that I changes from above but the results say lua_cmd error from the game notice. HardenTable = {} function Skill_Shpf_End ( ATKER , DEFER , sklv ) local statelv = sklv local statetime = 600 local deferId = GetPlayerID(GetChaPlayer(DEFER)) local bufferSpr = Sta(ATKER) local cmd = string.format("HardenTable[%d]=%d",deferId,bufferSpr) lua_all(cmd,role) AddState ( ATKER , DEFER , STATE_SHPF , statelv , statetime ) end function State_Shpf_Add ( role , statelv ) local buffer_spr = 0 local deferId = GetPlayerID(GetChaPlayer(role)) if HardenTable[deferId] ~= nil then buffer_spr = HardenTable[deferId][bufferSpr] end local def_dif = 10 + statelv * 4 + buffer_spr local def = DefSb(role) + def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end function State_Shpf_Rem ( role , statelv ) local buffer_spr = 0 local deferId = GetPlayerID(GetChaPlayer(role)) if HardenTable[deferId] ~= nil then buffer_spr = HardenTable[deferId][bufferSpr] HardenTable[deferId] = nil end local def_dif = 10 + statelv * 4 + buffer_spr local def = DefSb(role) - def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end
  10. I did get this result before with different code but same issues where when I change location into different map server ( since its not advisable to put 3 big map in 1 server ), the calculation remove the SPR effect leaving the original buff calculation. Clean code btw bro. Better version than what I do.
  11. Tested out on all the possible ways and here is the result. 1. The target player get double the buff based on your script calculation if in poss before being buff by the buffer. The SPR amount that calculated is not the buffer but instead the player itself. 2. The cross server buff effect registered but the end result is not as expected. I prefer the buffer SPR affect the calculation of the def and benefit of the buff given to the targeted player. But your poss script is much much simple than what I tried to do and that something new.
  12. I actually don't have knowledge on how to to implement it as a global function or make a separate files. 1. Lets says that in a table array, I construct it like this. local buff_table = {} local buff_atker = {} --i simplified it on the table.insert here for now. buff_table[buff_atker] = { Buff_targetID = "ChaID" , State = "skill state", Timer = "needed?" } Lets says when the buff given to a target "Buff_targetID" by "buff_atker" with a certain skill "State". How do I made it check inside other gameserver when it is only a readable table. 2. If lets say the buffer buff multiple target, the duration of the buff state itself would not be the same and lets say after the buff duration end, how do I clear individual table data?
  13. UP again, need more input from others. Thanks
  14. Obviously it ain't conventional but hey, it worked with the files version he work with
  15. Instead you can just make a check on itemID in the inventory to enable a certain STATE and include the item stats of your choice in the calculation of updated stats when equipped.
  16. I know you have been helpful @mkhzaleh. Probably hope other can help me more. I just can't understand the way to make it work for now. Or somehow with trials, I might find the correct way. Anyways, hats off to you for the help.
  17. the syntax that you provide such as luall and globalBuff, I tried to check on how to use it properly but to no avail. not at my level of understanding for now. Need a solid case of an example for me to implemented it myself. Do you mind provide me with an example of it ?
  18. Okay with assistance from @mkhzaleh. I'm able to make the buff worked with Spirit stats. Few bugs that occur to me when using this code. 1. The buff retain the 1st buff without poss even after rebuff with poss and vice versa. 2. Sometimes the buff did not calculated when teleporting into other region. It seem like the value changes by location. E.g If i buff a char in Argent, the value when entering Shaitan is original value, same goes to other location. But, if I then go to Shaitan and buff the same char, the value sustain in Argent and Shaitan and not other location. AND if I swap into poss and buff the same char, the value change into the last buff recorded in the previous location and when I get back to the location of the buff with poss, the value calculated to the new value. Seem like there is a memory issues here which I don't know how to resolved. Here is the code. function Skill_Shpf_End ( ATKER , DEFER , sklv ) c = { STATE_JLFT1 , STATE_JLFT2 , STATE_JLFT3 , STATE_JLFT4, STATE_JLFT5, STATE_JLFT6 , STATE_JLFT7, STATE_JLFT8 } local semak_state = 0 if semak_state == c[1] or semak_state == c[2] or semak_state == c[3] or semak_state == c[4] or semak_state == c[5] or semak_state == c[6] or semak_state == c[7] or semak_state == c[8] then local sta_buff = Sta(ATKER)--try tambah a = {} table.insert(a,1,sta_buff) local statelv = sklv local statetime = 600 AddState ( ATKER, DEFER, STATE_SHPF, statelv, statetime ) else local sta_buff = Sta(ATKER)--try tambah a = {} table.insert(a,1,sta_buff) local statelv = sklv local statetime = 600 AddState ( ATKER, DEFER, STATE_SHPF, statelv, statetime ) end --local sta_buff = Sta(ATKER)--try tambah --a = {} --table.insert(a,1,sta_buff) --local statelv = sklv --local statetime = 600 --ubah jd 10min. khairul ubah, asl 180 --AddState ( ATKER , DEFER , STATE_SHPF , statelv , statetime ) --asal atker depan --LG("skill_Shpf", "function Skill_Def_Shpf : " , "role = " , role , "sklv = " , sklv , "\n" ) --xterlibat end function State_Shpf_Add ( role , statelv ) --LG("state", "function State_Shpf_Add : " , " role = ", role, "statelv = " , statelv , "\n" ) --local sta_buff = Sta(role) local def_dif = 10 + a[1] + statelv * 4 -- asal 10 + statelv * 4 local def = DefSb(role) + def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end function State_Shpf_Rem ( role , statelv ) -- LG("state", "function State_Shpf_Rem : " ,"statelv = " , statelv , " role = ", role, "\n" ) --local sta_buff = Sta(role) local def_dif = 10 + a[1] + statelv * 4 local def = DefSb(role) - def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end
  19. Okay thanks @mkhzaleh. Figured it out. Working as expected.
  20. @mkhzaleh i tried simply change it into this local sta_buff = Sta(role) This actually work but the stats its calculated is based on the target Spirit not the buffer. Probably that is why in heal, it used ATKER instead of other role. now need to think on how to ensure the buffer Spirit is used for the def calculation
  21. I tried to include the value of Spirit into the calculation of def_dif so that it can be add and remove. Is it not ATKER role? weird since I check the one for heal. it seem like it. but the one on heal seem be complicated and I don't know how to properly align it with the harden.
  22. I tried to change the way it calculate harden buff with Sta in play but it just not working out. Can you check why its not working based on this code. function State_Shpf_Add ( role , statelv ) --LG("state", "function State_Shpf_Add : " , " role = ", role, "statelv = " , statelv , "\n" ) local sta_buff = Sta(ATKER) * 0.5 -- tarik stats spr local def_dif = 10 + sta_buff + statelv * 4 -- asal 10 + statelv * 4 local def = DefSb(role) + def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end function State_Shpf_Rem ( role , statelv ) -- LG("state", "function State_Shpf_Rem : " ,"statelv = " , statelv , " role = ", role, "\n" ) local sta_buff = Sta(ATKER) * 0.5 local def_dif = 10 + sta_buff + statelv * 4 local def = DefSb(role) - def_dif SetCharaAttr( def , role , ATTR_STATEV_DEF ) ALLExAttrSet(role) end I tried it multiple time, simply adding a check for Sta also fails the skill. not including the Sta call up inside the def_dif calculation for that trial. But in the code I include it and it also fail. it wont change the value from the before buff value.
  23. Known as an example that a cleric spiritual bolt is the only dmg skill that affected by Spirit stats. Can anyone guide me on how to change other buff to be affected by Spirit stats also. In the function for spiritual bolt, is this indicate spirit level ? function Skill_Xlcz_End ( ATKER , DEFER , sklv ) if ValidCha(ATKER) == 0 then LG ( "luascript_err" , "function Skill_Xlcz_End : ATKER as null" ) return end if ValidCha(DEFER) == 0 then LG ( "luascript_err" , "function Skill_Xlcz_End : DEFER as null" ) return end -- local atkdmg = Atk_Dmg ( ATKER , DEFER ) local lv_atker = Lv ( TurnToCha ( ATKER ) ) local lv_defer = Lv ( TurnToCha ( DEFER ) ) local sta_atker = Sta(ATKER) -- IS THIS THE Spirit STATS or IS THIS SP AMOUNT? local sta_defer = Sta(DEFER) local lv_dif = math.max ( ( - 1 ) * 10 , math.min ( 10 , lv_atker - lv_defer ) ) local AddStateLv = 0 AddStateLv = GetChaStateLv ( ATKER , STATE_MLCH ) hpdmg = math.floor (( 10 + sta_atker * 2 ) * ( 1 + sklv * 0.25 ) * ( 1 + lv_dif * 0.025 )) local map_name_ATKER = GetChaMapName ( ATKER ) local map_name_DEFER = GetChaMapName ( DEFER ) local agi_atker = Agi(ATKER) local Can_Pk_Garner2 = Is_NormalMonster (DEFER) if map_name_ATKER == "garner2" or map_name_DEFER == "garner2" then if Can_Pk_Garner2 == 0 then local dmg = MAGIC_Atk_Dmg(ATKER,DEFER) hpdmg = math.floor (dmg * ( 1 + sklv * 0.1 ) ) -- Notice ( "statetime="..statetime) end end local dmg_fin = Cuihua_Mofa ( hpdmg ,AddStateLv ) local dmg_ElfSkill = ElfSkill_MagicAtk ( hpdmg , ATKER ) dmg_fin = dmg_fin + dmg_ElfSkill Hp_Endure_Dmg ( DEFER, dmg_fin ) -- LG( "xlcz", "Spiritual Bolt Skill Level=" , sklv ,"Attacker sta=", sta ,"Normal attack damage=", atkdmg , "Skill Damage= " , dmg , "\n" ) end Is this the part for Spirit Stats or is it SP amount? local sta_atker = Sta(ATKER)
×
×
  • Create New...