Jump to content

kyleflow

Advanced members
  • Content Count

    230
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by kyleflow

  1. Free exploits? I don't see any possible files offering that. But most server using 1.38 as the base files which is the most popular among server owner. Though personally I just can't seem to tinker around with 1.38 without messing it code especially new gem and etc. But many succeed, probably only me.
  2. exceed expectations. but i prefer a simple leveling animation. that sudden full white
  3. check my guide on fairy. u can specify the stats changes and check the fairy type to be 59
  4. kyleflow

    Fairy Bug

    I'm not sure to call this a bug. If you check, the fairies that give lower stats actually increase a lot more min and max attacks stats for the same fairies level. correct me if im wrong since i'm on my mobile device viewing this
  5. You can check the language from the CO files provided. But when compiled by VS, mostly its lua.
  6. Okay today I would like to share my files for PKO with base 1.36 by Lucky. The changes I made are as follows. FC -35 - 55 DS = 45 -65 DW = 65 - 100 Custom Accessories - Accessories fragment from LT 1 to 7 Kylin - 30 card from various hell boss - low rate August pet with Angela poss effect - from 2 cupid isle boss, fairly good drop IMP from FC Wailling Warrior(confirm drop) and DS with low chance drop from Mud Man -- only low lvl dungeon can gain. PS: since I made this to play solo, the system itself vulnerable for exploit Exchanger for CA set, CA does not give CA box anymore. Exchanger for DS item if you want to change your current loot into DS box and try again -- 100k per try. SB bag lv1 from reputation. Other reputation exchange can check there. Extracting gem give you refining gem also. Improved fruit exchanger Custom Soro and Eternal gem as per other server, add movement speed and attack speed. Other custom gem forge location. Can try and error on that. Included in the files is the backup files for suggested item mall. Contract system in DS and DW for gaining gold. I limit DS for DS1 only. Some mods implementation by V3ctor to beautify the game. Other that not mentioned can be discovered in game. https://drive.google.com/file/d/1dG1qyd5JeLUskQT97nnVwS00IKHG7IiU/view?usp=drive_link
  7. kyleflow

    Adding a Fairy

    Today I will explain about how you may add a new fairy. As an example, you can use the Dragon Fairy Files from this archive. https://mega.nz/folder/OUMUgTYb#jtCsqh7halK_O9uzWyaG0g/folder/KcdVQK6a Add all the included item for client side into client. Add iteminfo.txt and then compiled it for client bin. Add '0' with tab after description depend on your iteminfo files version. Example here already have it. XXXX Dragon Spirit n1921 10130005 0 0 0 0 0 0 59 0 0 0 0 0 1 1 1 1 1 1 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 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 10,10 0 240,240 5000,5000 0 0 0 0 0 0 0 0 0 0 0 0 0 YYYY,0 0 0 Dragon Fairy. 0 Place this with sceneffectinfo.txt and compile it for client bin. YYYY xhlgua.par Dragon Class Sea Wave 1 0 0 -1 0 0 0 -1 XXXX = iteminfoID YYYY = SceneffectinfoID -- replace also this inside the iteminfo.txt for dragon spirit. Basically this is already a complete way to add a new model of fairy but you will not get the fairy effect or even possession fairy skill. This guide I made only the portion where the check for pet marriage is ignored. ( Can find in other forum about this check, mine already removed if I'm not mistaken ). Open skilleffect.lua and find this " Skill_JLFT_End ( ATKER , DEFER , sklv ) " Try to make the equation after this code local Item_ID = GetItemID ( item_elf ) With this code if Item_ID==231 then AddState( ATKER , ATKER , STATE_JLFT1, statelv , statetime ) elseif Item_ID==232 then AddState( ATKER , ATKER , STATE_JLFT2, statelv , statetime ) elseif Item_ID==233 then AddState( ATKER , ATKER , STATE_JLFT3, statelv , statetime ) elseif Item_ID==235 then AddState( ATKER , ATKER , STATE_JLFT4, statelv , statetime ) elseif Item_ID==234 then AddState( ATKER , ATKER , STATE_JLFT5, statelv , statetime ) elseif Item_ID==236 then AddState( ATKER , ATKER , STATE_JLFT6, statelv , statetime ) elseif Item_ID==237 then AddState( ATKER , ATKER , STATE_JLFT7, statelv , statetime ) elseif Item_ID==681 then AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime ) elseif Item_ID==500 or Item_ID == 7362 or Item_ID == 7363 or Item_ID == 7364 or Item_ID == 7365 or Item_ID == 7353 then AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime ) The default pet in most iteminfo.txt only have 231 until 500, the other ID mentioned here is based on your custom iteminfoID for your fairy. This function declared a state for the respected fairy. Find State_JLFT_Add ( role , sklv ) and below this code local Part7 = GetNum_Part7 ( Num_JL ) add this code or make it similar to this code. if Part1 == 1 then local star = 0 local statelv = lv_JL * 0.025 * (sklv + 1) * 0.05 ----lv*1/40*(skilllv+1)/2*0.1 if Item_ID ==232 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_STR) end if Item_ID ==233 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_CON) end if Item_ID ==234 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_STA) end if Item_ID ==235 then local star = lv_JL SetCharaAttr(star, role, ATTR_STATEV_DEX) end if Item_ID ==236 then local star = lv_JL SetCharaAttr(star ,role , ATTR_STATEV_AGI) end if Item_ID == 681 or Item_ID == 231 or Item_ID == 237 then if str~=nil and str~=0 then SetCharaAttr(str ,role , ATTR_STATEV_STR) end if con~=nil and con~=0 then SetCharaAttr(con ,role , ATTR_STATEV_CON) end if sta~=nil and sta~=0 then SetCharaAttr(sta ,role , ATTR_STATEV_STA) end if dex~=nil and dex~=0 then SetCharaAttr(dex ,role , ATTR_STATEV_DEX) end if agi~=nil and agi~=0 then SetCharaAttr(agi ,role , ATTR_STATEV_AGI) end end if Item_ID == 500 or Item_ID == 7362 or Item_ID == 7363 or Item_ID == 7364 or Item_ID == 7365 or Item_ID == 7353 then -- august pet 1 4 dan dragon pet if str~=nil and str~=0 then local star = str*1.2 SetCharaAttr(star ,role , ATTR_STATEV_STR) end if con~=nil and con~=0 then local star = con*1.2 SetCharaAttr(star ,role , ATTR_STATEV_CON) end if sta~=nil and sta~=0 then local star = sta*1.2 SetCharaAttr(star ,role , ATTR_STATEV_STA) end if dex~=nil and dex~=0 then local star = dex*1.2 SetCharaAttr(star ,role , ATTR_STATEV_DEX) end if agi~=nil and agi~=0 then local star = agi*1.2 SetCharaAttr(star ,role , ATTR_STATEV_AGI) end local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.05 --asal 0.02 local star2 = GetChaAttr( role, ATTR_BMF ) SetCharaAttr(star ,role , ATTR_BMF) local star = GetChaAttr( role, ATTR_STATEV_PDEF ) + 3 SetCharaAttr(star ,role , ATTR_STATEV_PDEF) end end end ALLExAttrSet(role) end As previously mentioned, the additional iteminfoID for new fairy is added in such a way to declared the stats changes by multiplier. In my case the stats is 1.2 more than normal possession for certain pet. local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.05 This part is the declaration part of drop rate during possession multiplier. You can play with the values but advise it to be low if you have higher level pet to ensure the drop rate is not too high if you aim for medium setting server. You can place this also with other fairy ID above since its a local declaration, you can simply called it with the same variables without conflict. Note to take, make sure all your fairyID have the same itemtype 59. Credit to the script owner or any contributor to the script. I simply sort it out for guides.
  8. new fairy model and animation. the assimilation part into the game, i think i can manage. something like dragon fairy, i might want some model that look like a ship, a monster and etc as a fairy
  9. Does anyone know what step should I do to make a Fairy? Like the tools and etc. I'm feeling ambitious to create new Fairy.
  10. Yeah seem like you are right. ATTR_BMF is the drop attribute based on translation. Should I set it like this for it to have better drop or is it not reading it properly if I did like this. local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.02 -- this is the preset setup ----change into something like this local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.4 -- should work right? Since the next part mentioning that SetCharaAttr(star ,role , ATTR_BMF) Just that here it declared another check on ChaAttr but never used. Causing a confusion here local star2 = GetChaAttr( role, ATTR_BMF ) -- not used until the closing of function
  11. Solved but the script very messy. Still if other have better ways to script it. please do comment. local StateLv1 = GetChaStateLv (t[i] , STATE_JLFT7 ) local StateLv2 = GetChaStateLv (t[i] , STATE_JLFT8 ) if Item_ID==237 and StateLv1~=0 then flag=1 end if Item_ID==681 and StateLv2~=0 then flag=1 end if Item_ID==500 and StateLv2~=0 then flag=1 end if Item_ID==7362 and StateLv2~=0 then flag=1 end if Item_ID==7363 and StateLv2~=0 then flag=1 end if Item_ID==7364 and StateLv2~=0 then flag=1 end if Item_ID==7365 and StateLv2~=0 then flag=1 end if flag==1 then ----有id为237或是681号的精灵并且精灵附体技能存在 tutup kejap if StateLv1 ~= 0 or StateLv2 ~= 0 then if Item_ID == 7362 or Item_ID == 7363 or Item_ID == 7364 or Item_ID == 7365 or Item_ID == 500 then exp_up = exp_up*2.5 else exp_up = exp_up*(lv_JL*0.02+1) end end --[[elseif flag==2 then if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end]]-- -- URE=URE-4500 end SetItemAttr ( Item_bg , ITEMATTR_URE , URE ) end
  12. I tried to add effect of mordo and angela jr into august pet and for the Stats wise, it seem like working well. But for the exp calculation, after the poss end, the benefit persist and even after log out after the 1st poss used, the exp kept giving exp benefit. does anyone knows why? here is the piece of script on the pet exp calculation section ---------------------------------------精灵加经验状态判断 Elf plus experience status judgment --local Check_star = {} -- Check_star[0] = t[i] -- Check_star[1] = GetTeamCha( t[i] , 0 ) -- Check_star[2] = GetTeamCha( t[i] , 1 ) -- Check_star[3] = GetTeamCha( t[i] , 2 ) -- Check_star[4] = GetTeamCha( t[i] , 3 ) --for m = 0 , 4 , 1 do -- if ValidCha( Check_star[m] )== 1 then --被加入组队经验分配的角色必须存在 local Item_bg = GetChaItem ( t[i] , 2 , 1 ) --取角色背包第二栏的指针 Get the pointer of the second column of the character's backpack local Get_Item_Type = GetItemType ( Item_bg ) --调用程序接口获得Item道具类型 Call the program interface to obtain the Item prop type if Get_Item_Type==59 then --------判断是否为精灵 local Item_ID = GetItemID ( Item_bg ) --取ID local str = GetItemAttr( Item_bg ,ITEMATTR_VAL_STR ) --力量 local con = GetItemAttr( Item_bg ,ITEMATTR_VAL_CON ) ---体质 local agi = GetItemAttr( Item_bg ,ITEMATTR_VAL_AGI ) --敏捷 local dex = GetItemAttr( Item_bg ,ITEMATTR_VAL_DEX ) --专注 local sta = GetItemAttr( Item_bg ,ITEMATTR_VAL_STA ) --精神 local URE = GetItemAttr( Item_bg ,ITEMATTR_URE ) --体力 local MAXURE = GetItemAttr( Item_bg ,ITEMATTR_MAXURE ) --最大体力 local lv_JL = str + con + agi + dex + sta ----一个精灵的等级 local Num_JL = GetItemForgeParam ( Item_bg , 1 ) local Part1 = GetNum_Part1 ( Num_JL ) --Get Num Part 1 到 Part 7 local Part2 = GetNum_Part2 ( Num_JL ) local Part3 = GetNum_Part3 ( Num_JL ) local StateLv1 = GetChaStateLv (t[i] , STATE_JLFT7 ) local StateLv2 = GetChaStateLv (t[i] , STATE_JLFT8 ) if Item_ID==237 and StateLv1~=0 then flag=1 end if Item_ID==681 and StateLv2~=0 then flag=1 end if Item_ID==7126 or Item_ID==500 and StateLv2~=0 then flag=2 end -------custom script start here ---------- if Item_ID==7126 or Item_ID==7362 and StateLv2~=0 then --August pet 1 to 4 flag=3 end if Item_ID==7126 or Item_ID==7363 and StateLv2~=0 then flag=4 end if Item_ID==7126 or Item_ID==7364 and StateLv2~=0 then flag=5 end if Item_ID==7126 or Item_ID==7365 and StateLv2~=0 then flag=6 end -----custom stop here------- if flag==1 then ----有id为237或是681号的精灵并且精灵附体技能存在 --if StateLv1 == 1 or StateLv2 == 1 then ---初级 -- exp_up = exp_up*(0.005*lv_JL*0.1+1) --end --if StateLv1 == 2 or StateLv2 == 2 then ---中级 -- exp_up = exp_up*(0.0125*lv_JL*0.1+1) --end --if StateLv1 == 3 or StateLv2 == 3 then ---高级 -- exp_up = exp_up*(0.025*lv_JL*0.1+1) --end --if StateLv1 ~= 0 or StateLv2 ~= 0 then --original if StateLv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*(lv_JL*0.02+1) end elseif flag==2 then if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end -- URE=URE-4500 ----custom start here ------ elseif flag==3 then--tmbah flag try if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end elseif flag==4 then--tambah flag try if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end elseif flag==5 then--tambah flag try if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end elseif flag==6 then--tambah flag try if Statelv1 ~= 0 or StateLv2 ~= 0 then exp_up = exp_up*2.5 end ------custom end here-------- end SetItemAttr ( Item_bg , ITEMATTR_URE , URE ) end -- end --end ------------------------------------------- -------------------------------------------
  13. Does anyone know where the script to decide luck and double EXP for possession skill in pet? I check the script for Skill_JLFT_BEGIN and its chain of setup, does not mentioned the setup of luck and exp. but exp can be seen reflected on exp gain but the luck is ambiguous. Can anyone guide me on this?
  14. Probably you have conflicted setup with offline store? If you have that one implemented. My first time seeing this error. Cool error though. Making the world look abundant.
  15. Does this skilleff bind into anything that changes the game dynamic? Want to replace it with cloak skilleff. 148 Skill - Defecate -1 0 State_jltx1_Add State_jltx1_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 830 1 0 0 0 0 0 0 0 149 Skill - Undergarment -1 0 State_jltx2_Add State_jltx2_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 831 1 0 0 0 0 0 0 0 150 Skill - Garment -1 0 State_jltx3_Add State_jltx3_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 832 1 0 0 0 0 0 0 0 151 Skill - Coin Shower -1 0 State_jltx4_Add State_jltx4_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 833 1 0 0 0 0 0 0 0 152 Skill - Fool -1 0 State_jltx5_Add State_jltx5_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 834 1 0 0 0 0 0 0 0 153 Skill - Snooty -1 0 State_jltx6_Add State_jltx6_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 835 1 0 0 0 0 0 0 0 154 Skill - Dumb -1 0 State_jltx7_Add State_jltx7_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 836 1 0 0 0 0 0 0 0 155 Skill - Dumb -1 0 State_jltx8_Add State_jltx8_Rem 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 837 1 0 0 0 0 0 0 0
  16. I do read it. Well since a standard things happen when you are doing this with scripting, a simplest of details you could have missed. I did asked in previous reply if that behavior of mobs is normal but I don't see any response from you which is okay that make me assume things are not working in certain part somehow. If my take on it is wrong, than it is wrong. Please don't cynically says that I "fixed" it as something that I do it out of bad intention to point out the things that is "wrong" with the script. Anyhow, thanks @Angelix on the release and point out my mistake again.
  17. Additional finding on Anomaly Tower. With the summon method above, I add more monster but after killing all mobs, the maps does not instantly enter 5 sec mode count down. This also affect the mini boss and main boss spawn. none spawn even when it suppose to spawn. Still checking if I can find where the conflicted setup. Need assistance also.
  18. @Angelix Propose fix for the mobs not aggro. I change this part of the Anomaly Function.lua to make mobs agro the player. for _, MonsterID in pairs(Anomaly.Floor[Floor].Monsters) do local PosX = math.random(Anomaly.Conf.MonsterSpawn.PosX.Min, Anomaly.Conf.MonsterSpawn.PosX.Max) local PosY = math.random(Anomaly.Conf.MonsterSpawn.PosY.Min, Anomaly.Conf.MonsterSpawn.PosY.Max) local Monster2 = CreateChaEx(0883, (PosX * 100), (PosY * 100), 145, 60, MapCopy) -- I use BD mobs here but you can use the preset mobs made by Angelix local Monster3 = CreateChaEx(0884, (PosX * 100), (PosY * 100), 145, 60, MapCopy) local Monster4 = CreateChaEx(0885, (PosX * 100), (PosY * 100), 145, 60, MapCopy) local Monster5 = CreateChaEx(0886, (PosX * 100), (PosY * 100), 145, 60, MapCopy) SetChaLifeTime(Monster2, 999999999) SetChaLifeTime(Monster3, 999999999) SetChaLifeTime(Monster4, 999999999) SetChaLifeTime(Monster5, 999999999) Anomaly.SetAttribute(Monster, Anomaly.Monster, Normal, Floor) Can implemented it into other part of the function for mini and Main boss. I summon it as garner2 does and still using the same files as you already set for the "SetAttribute". It work like a charm and now I can enjoy it better since the mobs is not static.
  19. Hi guys, in GM command, we use it like this right. &summon <CharacterInfoID>, SetChaLifeTime, <the aggressive nature of mobs> For the aggressive nature of mobs, what is it called? Like SetChaLifeTime, we can simply specify the parameter in function like this. SetChaLifeTime = (CharacterInfoID, <value> ) So for the aggressive part, how do I specified it.
  20. Not yet. Still testing the current test and I'm able to save the progress by simply created a Cache folder. Just one thing I notice, the mobs is not attacking the player. Let me check if the monster spawn is the same as other map. Probably can make it aggro. Thanks for this wonderful addition. Probably after I complete with adjusting this, will release back what I had that would make a solo RPG style TOP.
  21. Thanks on the functions. It worked well. My bad for not understanding things on this. Just weird that with every floor, it kept closing maps and the mobs is the same for each entry. Is it supposed to be like that or I need configure with your configuration guide in github?
  22. Thanks @Angelix for sharing the code. My serialize.lua probably not completed. I got it from the mega folder which stored PKO related stuff and the function you provided is not there. When I add the function, it solved 1 error but another 1 still persist. "AdjustTextSpace" error occur when I check with lua_err.log . So I tried the same way of introducing the other custom serialize function and the GS error is gone but inside the game, a parameter error persist. I will share here the current state of my serialize.lua and the error inside the game. --[[ Save Table to File/Stringtable Load Table from File/Stringtable v 0.94 Lua 5.1 compatible Userdata and indices of these are not saved Functions are saved via string.dump, so make sure it has no upvalues References are saved ---------------------------------------------------- table.save( table [, filename] ) Saves a table so it can be called via the table.load function again table must a object of type 'table' filename is optional, and may be a string representing a filename or true/1 table.save( table ) on success: returns a string representing the table (stringtable) (uses a string as buffer, ideal for smaller tables) table.save( table, true or 1 ) on success: returns a string representing the table (stringtable) (uses io.tmpfile() as buffer, ideal for bigger tables) table.save( table, "filename" ) on success: returns 1 (saves the table to file "filename") on failure: returns as second argument an error msg ---------------------------------------------------- table.load( filename or stringtable ) Loads a table that has been saved via the table.save function on success: returns a previously saved table on failure: returns as second argument an error msg ---------------------------------------------------- chillcode, http://lua-users.org/wiki/SaveTableToFile Licensed under the same terms as Lua itself. ]]-- do -- declare local variables --// exportstring( string ) --// returns a "Lua" portable version of the string local function exportstring( s ) s = string.format( "%q",s ) -- to replace s = string.gsub( s,"\\\n","\\n" ) s = string.gsub( s,"\r","\\r" ) s = string.gsub( s,string.char(26),"\"..string.char(26)..\"" ) return s end --// The Save Function function table.save( tbl,filename ) local charS,charE = " ","\n" local file,err -- create a pseudo file that writes to a string and return the string if not filename then file = { write = function( self,newstr ) self.str = self.str..newstr end, str = "" } charS,charE = "","" -- write table to tmpfile elseif filename == true or filename == 1 then charS,charE,file = "","",io.tmpfile() -- write table to file -- use io.open here rather than io.output, since in windows when clicking on a file opened with io.output will create an error else file,err = io.open( filename, "w" ) if err then return _,err end end -- initiate variables for save procedure local tables,lookup = { tbl },{ [tbl] = 1 } file:write( "return {"..charE ) for idx,t in ipairs( tables ) do if filename and filename ~= true and filename ~= 1 then file:write( "-- Table: {"..idx.."}"..charE ) end file:write( "{"..charE ) local thandled = {} for i,v in ipairs( t ) do thandled[i] = true -- escape functions and userdata if type( v ) ~= "userdata" then -- only handle value if type( v ) == "table" then if not lookup[v] then table.insert( tables, v ) lookup[v] = table.getn(tables) end file:write( charS.."{"..lookup[v].."},"..charE ) elseif type( v ) == "function" then file:write( charS.."loadstring("..exportstring(string.dump( v )).."),"..charE ) else local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) file:write( charS..value..","..charE ) end end end for i,v in pairs( t ) do -- escape functions and userdata if (not thandled[i]) and type( v ) ~= "userdata" then -- handle index if type( i ) == "table" then if not lookup[i] then table.insert( tables,i ) lookup[i] = table.getn(tables) end file:write( charS.."[{"..lookup[i].."}]=" ) else local index = ( type( i ) == "string" and "["..exportstring( i ).."]" ) or string.format( "[%d]",i ) file:write( charS..index.."=" ) end -- handle value if type( v ) == "table" then if not lookup[v] then table.insert( tables,v ) lookup[v] = table.getn(tables) end file:write( "{"..lookup[v].."},"..charE ) elseif type( v ) == "function" then file:write( "loadstring("..exportstring(string.dump( v )).."),"..charE ) else local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) file:write( value..","..charE ) end end end file:write( "},"..charE ) end file:write( "}" ) -- Return Values -- return stringtable from string if not filename then -- set marker for stringtable return file.str.."--|" -- return stringttable from file elseif filename == true or filename == 1 then file:seek ( "set" ) -- no need to close file, it gets closed and removed automatically -- set marker for stringtable return file:read( "*a" ).."--|" -- close file and return 1 else file:close() return 1 end end file_exists = file_exists or function(name) local f = io.open(name, 'r') if(f ~= nil)then io.close(f) return true else return false end end AdjustTextSpace = AdjustTextSpace or function(name) --custom function with reference to the one you provided Angelix local f = io.open(name, 'r') if(f ~= nil) then io.close(f) return true else return false end end --// The Load Function function table.load( sfile ) -- catch marker for stringtable if string.sub( sfile,-3,-1 ) == "--|" then tables,err = loadstring( sfile ) else fd = nil while(fd == nil) do fd, err = io.open(sfile, "rw") end tables,err = loadfile( sfile ) io.close(fd) end if err then return _,err end tables = tables() for idx = 1,table.getn(tables) do local tolinkv,tolinki = {},{} for i,v in pairs( tables[idx] ) do if type( v ) == "table" and tables[v[1]] then table.insert( tolinkv,{ i,tables[v[1]] } ) end if type( i ) == "table" and tables[i[1]] then table.insert( tolinki,{ i,tables[i[1]] } ) end end -- link values, first due to possible changes of indices for _,v in ipairs( tolinkv ) do tables[idx][v[1]] = v[2] end -- link indices for _,v in ipairs( tolinki ) do tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil end end return tables[1] end -- close do end I also check inside your github page, and I find a file under .vscode with a list of probably serialize that I should have? or there is a way to utilize the file you provided there.
  23. I did my best to follow your guide on this but I failed to load this 2 files. I also confused how you define to have the npc and the map to be in the same origin map. This is the error that I get from my GS.
  24. @AlGhoul I added a picture below of me loading the hook and serialize inside initial.lua. is this consider properly load? just for confirmation
×
×
  • Create New...