Jump to content

iZae

Community
  • Content Count

    81
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by iZae

  1. Cool, that's what I ment. If you want players to stay X time since they took the quest, you need to store the total_live_time (at the moment they begin the quest) into a file trough serialize, and then check: current total_live_time - stored total_live_time = time elapsed since you took the quest. if time elapsed == mission requirement then give reward.
  2. I'm not sure at all, and I can't check it but I think the online time was stored somewhere on the database. (I'm guessing this 'cause I remember seeing some sites that display the online time for every character on your account). Try to search inside DBs. In case you find it stored somewhere, you should use LuaSql extension and play with it. That may be not so helpful, but it is only a hint.
  3. You're missing textures and models. Just download the full client from the server's site and it'll be done.
  4. You need the .map and .obj on client side, you need .atr, .blk on server side plus: entry.lua ctrl.lua add the map on mapinfo.txt add the birth point on birth_conf.lua add the map on gameserver.cfg Make sure you had everything done
  5. Indeed, i consider it even more professional. Noone donate their hardest work to charity.
  6. Quiere saber como importar modelos de otros juegos y convertirlos al lgo que permita el ToP. Le sugerí que hable con vos porque sos el más capito.
  7. Maybe you could ask Wolfen. But yes, you can, you need the model and texture, and use the lgo converter. I think is complicated for beginers
  8. so you have 1 function named CheckTeam and 2 sdks? CheckTeam and CheckTeam1? if so, CheckTeam should work. If you have only one sdk, be sure it matches with the function name (CheckTeam instead CheckTeam1), so you should change atleast the line local ret = CheckTeam1( character, conditions.p1, conditions.p2 ) local ret = CheckTeam1( character, conditions[i].p1, conditions[i].p2 ) but my suggestion is to change "elseif conditions.func == CheckTeam1 then" aswell
  9. untested and not sure if every step is correct, but as a starting hint will be really good. Inside functions.lua add function CheckPetLv (role) local Pet_Slot = GetChaItem ( role , 2 , 1 ) local Pet_ID = GetItemID ( Pet_Slot ) local item_type = GetItemType ( Pet_Slot ) local str = GetItemAttr( Pet_Slot ,ITEMATTR_VAL_STR ) local con = GetItemAttr( Pet_Slot ,ITEMATTR_VAL_CON ) local agi = GetItemAttr( Pet_Slot ,ITEMATTR_VAL_AGI ) local dex = GetItemAttr( Pet_Slot ,ITEMATTR_VAL_DEX ) local sta = GetItemAttr( Pet_Slot ,ITEMATTR_VAL_STA ) local Lv = str + agi + dex + con + sta if item_type == 59 then return Lv else return 0 end end function GiveIfHasPet(role) local petLv = CheckPetLv (role) local done = HasRecord( role, RecordID) if petLv ~= 0 then if done == 0 then GiveItem( role, 0, ItemID, Qt, Ql ) SetRecord( role, RecordID) else SystemNotice(role, 0. "You took your prize already") end else SystemNotice(role, 0, "You don't have a fairy on the Pet Slot") end end and edit: petLv condition (set "if petLv ~= 0 then" to "if petLv < 40 then", in case you set the condition to have a lv 41 or higher pet) edit ItemID to the item you're willing to give players, Qt to its quantity, Ql to its quality, RecordID to an unused record (just to avoid players re-take the items more than once) then go to npcsdk and under if item.func == JumpPage then return JumpPage( character, npc, page, item.p1 ) add elseif item.func == GiveIfHasPet then return GiveIfHasPet( character) and now you can use the following line on a npc script Text(1, "Redeem your item", GiveIfHasPet)
  10. iZae

    Monster Item

    you have to use "OR". it is physically impossible to get more than 1 id every time you kill a mob, so "if id=... and id= ..." would be senseless.
  11. iZae

    Monster Item

    go into exp_and_level.lua and find the function GetExp_PKM somewhere inside of it add local dead_id = GetChaID(dead) if dead_id == XXXX then local rand = math.random(1,100) if rand < 60 then GiveItem ( atk , 0 , ItemID , Qt , Ql ) else BickerNotice ( atk, "You weren't lucky enough. Keep trying!") end end changin XXXX for the boss/monster Id, ItemID item's id, Qt for the quantity, Ql for the quality and 60 for the desired % of success rate.
  12. iZae

    Simple VIP

    inside Vip.lua are the following instructions. Installation: 1) Change VIP.SavePath to your desired save path. 2) Change VIP.State to the state you wish to add to a VIP player 3) Add lines to iteminfo eg: 8967 VIP 10 Seconds n1216 10130016 0 0 0 0 0 0 31 0 0 0 0 0 1 1 1 1 1 0 200 -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 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 AddVIP 0 0 0 0,0 0 0 Use to get VIP 8968 VIP 1 Day n1216 10130016 0 0 0 0 0 0 31 0 0 0 0 0 1 1 1 1 1 0 200 -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 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 AddVIP 0 0 0 0,0 0 0 Use to get VIP 8969 VIP 7 Days n1216 10130016 0 0 0 0 0 0 31 0 0 0 0 0 1 1 1 1 1 0 200 -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 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 AddVIP 0 0 0 0,0 0 0 Use to get VIP 4) Adjust VIP.Items to have the ID of the item as the index, and the time in seconds that the item will add upon use as the value eg : [8967] = 10, Means item 8967 will add 10 seconds to VIP. 5) Load this file with DoFile()
  13. Too lazy to re-do it ('cause I made it like 4 years ago with LazyKid) but you can search for it on old serverdev archive ( @Shako 's link to old forums archive is dead tho). But as a hint, you need to play with attrs. 0) force the player to unequip everything (since you don't want a lv 1 player with a lv 75 equipment) 1) reset skills and stats 2) Set attr_lv and attr_exp to 1 3) set attr_ap to 15 (you can play here with how many resets the player have) 4) set attr_tp to 1 (in case you want skill points to 1) 5) add rebirth skills (checking if they had them) 6) Refreshcha(role)
  14. iZae

    Lots

    add the same lines local attr_xxxx = GetChaAttr( role , ATTR_XXX ) local attr_add = YY attr_xxxx = attr_xxxx + attr_add SetCharaAttr( attr_xxxx, role, ATTR_XXX ) replacing everything I told you. Final example: (1 item that adds 20 movement speed and 10 attack speed) function ItemUse_AAAA( role , Item ) local Cha_Boat = 0 Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat == nil then local attr_mspd = GetChaAttr( role , ATTR_MSPD ) local attr_add_mspd = 20 attr_mspd = attr_mspd + attr_add_mspd SetCharaAttr( attr_mspd, role, ATTR_MSPD ) local attr_aspd = GetChaAttr( role , ATTR_ASPD ) local attr_add_aspd = 10 attr_aspd = attr_aspd + attr_add_aspd SetCharaAttr( attr_aspd, role, ATTR_ASPD ) RefreshCha(role) else SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end end Take in consideration that this kind of item will permanently add those attributes. If you want to temporaly add stats, you have to do it trough STATES (Check potion of lion or skating potion to see an example)
  15. I am not quite sure and I can't test it, but you can try it. Go on attrcalculate.lua and find the function called function BsAttrUpgrade( role ) Inside it, find if lv > 9 then tp_extre = 1 end if lv >= 65 then if ( math.floor ( ( lv ) / 5 ) - math.floor ( ( lv - 1 ) / 5 ) ) == 1 then tp_extre = 2 else tp_extre = 1 end end attr_tp = attr_tp + tp_extre SetCharaAttr( attr_tp, role, ATTR_TP ) and replace it for if lv > 9 then -- Only players above lv 9 will get skill points tp_extre = 2 end attr_tp = attr_tp + tp_extre SetCharaAttr( attr_tp, role, ATTR_TP ) Voilá
  16. iZae

    Lots

    Just make a new usable Item (you can copy iteminfo's line from career lot and edit name, id, price, description and so on) and inside itemeffect.lua just add the following code function ItemUse_AAAA( role , Item ) local Cha_Boat = 0 Cha_Boat = GetCtrlBoat ( role ) if Cha_Boat == nil then local attr_xxxx = GetChaAttr( role , ATTR_XXX ) local attr_add = YY attr_xxxx = attr_xxxx + attr_add SetCharaAttr( attr_xxxx, role, ATTR_XXX ) RefreshCha(role) else SystemNotice( role , "Cannot use while sailing" ) UseItemFailed ( role ) return end end where ItemUse_AAAA is the usage script name (one of the last columns of Iteminfo.txt) attr_xxxx is just a variable name, you can asign what you want, but I suggest you to use the attr you're going to give with the lot (e.g. attr_aspd for attack speed) ATTR_XXX is the attribute name as you find it on attrtype.lua YY is the number of the ammount you're going to give. List of attrtypes you may want: ATTR_STR : Strength ATTR_DEX : Accuracy ATTR_AGI : Agility ATTR_CON : Constitution ATTR_STA : Spirit ATTR_LUK : Cant remember ATTR_MXHP : Max Hp ATTR_MXSP : Max Sp ATTR_MNATK : Min Attack ATTR_MXATK : Max Attack ATTR_DEF : Defense ATTR_HIT : Hit Rate ATTR_FLEE : Dodge rate ATTR_MF : Can't remember ATTR_CRT : Critical Rate ATTR_HREC : Hp recovery rate ATTR_SREC : Sp recovery rate ATTR_ASPD : Attack Speed ATTR_ADIS : Can't remember ATTR_MSPD : Movement Speed ATTR_COL : Can't remember ATTR_PDEF : Physical Defense I Hope it's clear and helpful.
  17. Then you did something wrong 'cause that is what you need to do. My suggestion, make a empty stringset .txt with only [77] "NewSErverName", compile it, and then copy the line from stringset.bin and replace the line 78 of your client's stringset.bin
  18. iZae

    [GUIDE] Daily Prize

    add the following code somewhere inside functions.lua function exists_file(name) local f=io.open(name,"r") if f~=nil then io.close(f) return true else return false end end
  19. if I'm not wrong, there's something missing. (Guessing he doesn't had it elsewhere either). What's missing is "marriage" variable standing for its State Number. I'd add it but idk which number it is.
  20. I don't have server files to personally check. But is your problem related to the skillbook? or the skill itself? Try adding the skill trough commands on your gm account and test if it works as Voyager too. If it does, then the problem is related to the usage of the skill book (search for the usage function name on the iteminfo line). If it doesnt, then the problem is related to the skill itself. I don't quite remember the skillinfo header, but I remember there was a column that restrict the skill depeding on the weapon type. I hope I'm being clear.
  21. Nop, there are no guides about them. That's why I suggest you to start from the easiest tasks, and once you achieve what you were trying, move to something more difficult, and so on till you have a bast knowledge about your files, ToP Functions and Lua syntax. Hooks and serialize are releases originally made by Matt, are just pieces of Lua codes you can use to make more lua codes to do complex stuff. Luasql is an extension made by Wrexor that allows you to do stuff on your databases (through sql queries) but coded on lua language. Handlechat is a feature of a custom gameserver made by V3ctor, that lets you handle the inputs players write on the local chat, so you are able to make server commands (like /buff) or harder and more useful stuff (like a Guild bank) But, once again I repeat, don't dive into those features if your knowledge isnt bast enough to fully understand them.
  22. There are tons of guides on how to set up your server, and many others guides about useful things. But there isn't and there won't be a guide that talks about everything you need to know or everything you try to do. I'd suggest you to get a clean files, and start really from scratch. By doing that you'll learn how to achieve every task you try, from the most basic (NPCs, quests, item usages, mobs, skills) to harder stuff. Once you think your knowledge is bast, I recommend you to learn how Hooks, serialize, handlechat and luasql works. (With those your chances of making unique features are bigger)
×
×
  • Create New...