Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/27/15 in all areas

  1. These guys helped me out so much today. They literally took over 4 hours helping me troubleshoot. Definitely recommend the chat. Special thanks to Nova, Stolao, Mary Magdalene, and the Heavy Breathing Cat. A thousand times thanks, Malkirion
    2 points
  2. Introduction Well this idea came up when evilpunker asked about the possibility of having a patch which loads a second file which overrides the iteminfo file. But there is a better way to do that with lua itself. How to do it? The key idea is that the item information is added using the main function by the client. so in your custom file you just need to modify the main function to accept your items. Here is how it can be done. -- Load the original file. As you might have guessed you can also load your translated file here instead -- (just make sure the "tbl" array contains your item info) dofile("System/iteminfo.lub") -- Now as a simple example . I am simply going to change name of Red Potion to Crimson Potion. -- But you can add anything in the same way. Format is same as the original one, just -- the table name is different tbl_custom = { [501] = { unidentifiedDisplayName = "Crimson Potion", unidentifiedResourceName = "»¡°£Æ÷¼Ç", unidentifiedDescriptionName = { "A potion made from", "grinded Red Herbs that", "restores ^000088about 45 HP^000000.", "^ffffff_^000000", "Weight: ^7777777^000000" }, identifiedDisplayName = "Crimson Potion", identifiedResourceName = "»¡°£Æ÷¼Ç", identifiedDescriptionName = { "^000088HP Recovery Item^000000", "A potion made from", "grinded Red Herbs that", "restores ^000088about 45 HP^000000.", "^ffffff_^000000", "Weight: ^7777777^000000" }, slotCount = 0, ClassNum = 0 }, } -- Now for a helper function because i hate repetitions -- It adds items from curTable if it is not present in refTable function itemAdder(curTable, refTable) for ItemID,DESC in pairs(curTable) do if refTable == nil or refTable[ItemID] == nil then result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum) if not result then return false, msg end for k,v in pairs(DESC.unidentifiedDescriptionName) do result, msg = AddItemUnidentifiedDesc(ItemID, v) if not result then return false, msg end end for k,v in pairs(DESC.identifiedDescriptionName) do result, msg = AddItemIdentifiedDesc(ItemID, v) if not result then return false, msg end end end end return true, "good" end -- And the newly designed main function function main() result, msg = itemAdder(tbl_custom, nil) -- add custom items (including official overrides) if result then result, msg = itemAdder(tbl, tbl_custom) -- add non-overridden official items end return result, msg end How is it useful? Think how item_db2.txt is useful for adding custom items in a server. Its the same strategy here. You can keep your official items in a base file (or you can just use the official iteminfo.lub file if you want the korean names) and keep your custom items in a different file (make sure the first dofile function calls the base file). The above code is error free, so feel free to copy and add your items . Hope the topic was not too confusing The lua code can be further expanded for overriding only parts of an official item. But i will leave that update for the future P.S. The client should be patched to accept your custom file not the base file.
    1 point
  3. Hmm maybe - script update points -1,{ OnPCLoginEvent: query_sql "INSERT INTO `acc_reg_num` (`account_id`, `key`, `index`, `value`) select account_id, '#CASHPOINTS', 0, `value` from `global_reg_value` where `account_id` "+ "= '"+ getcharid(3) +"' on duplicate key update `acc_reg_num`.`value` = `acc_reg_num`.`value` + `global_reg_value`.`value`"; query_sql "delete from `global_reg_value` where account_id = "+ getcharid(3) +" and `str` = '#CASHPOINTS'"; end; }
    1 point
  4. Add a condition under onpccalcevent like If($bonusstats){ Bonus bstr,1; } And add an at command to toggle this on or off for the server or whatever Depends on your exact needs Here is an example of it in use https://github.com/Stolao/Npc_Release/blob/master/Weapon_Mastery/WeaponMastery_v1.21.txt
    1 point
  5. OnPCStatCalcEvent: bonus bStr,1; bonus bAgi,1; bonus bDex,1; end;
    1 point
  6. Everyone have their right to voice their opinion. Its also true that IRC channel has been there for so long, its not dead. Discordapp is just providing another alternative option to the members to carry on discussions. more lively i guess, since most of the user treat IRC channel as dead/afk. Although I didnt join often join IRC, I do know it's still alive. For me, the Discordapp is just more fancy than IRC ... the rest is basically the same. It's still a chatroom after all.
    1 point
  7. sir, sinunod ko po yung guides na ginawa nyo, kaso pagsinusuot ko na yung item di ko naman po makita yung mga sprite sir, panu po kaya yun sir, pahelp naman po,
    1 point
×
×
  • Create New...