Jump to content

mkhzaleh

Community
  • Content Count

    304
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by mkhzaleh

  1. TicketsUse = {Enabled = true, Ticket = {}, BlackList = {}} TicketsUse.BlackList["garner2"] = {Name = "Chaos Argent", Active = true} TicketsUse.BlackList["prisonisland"] = {Name = "Prison Island", Active = true} TicketsUse.Ticket[3141] = {Name = "", Level = {Min = nil, Max = nil}} --old ticket TicketsUse.Ticket[4602] = {Name = "Argent City", Level = {Min = nil, Max = nil}} ------- how to use ---TicketsUse.Ticket[ItemID] = {Name = "Birth", Level = {Min = 15, Max = 50}} -------- --function of iteminfo function TicketHandler(Player, Item) local ItemID = GetItemID(Item) if TicketsUse.Ticket[ItemID] == nil then SystemNotice(Player, "["..GetItemName(ItemID).."] is not usable, please contact administrator.") UseItemFailed(Player) return end if TicketsUse.Ticket[ItemID].Level.Min ~= nil and GetChaAttr(Player, ATTR_LV) < TicketsUse.Ticket[ItemID].Level.Min then SystemNotice(Player, "["..GetItemName(ItemID).."] is only usable for players above level "..TicketsUse.Ticket[ItemID].Level.Min..".") UseItemFailed(Player) return end if TicketsUse.Ticket[ItemID].Level.Max ~= nil and GetChaAttr(Player, ATTR_LV) > TicketsUse.Ticket[ItemID].Level.Max then SystemNotice(Player, "["..GetItemName(ItemID).."] is only usable for players below level "..TicketsUse.Ticket[ItemID].Level.Max..".") UseItemFailed(Player) return end if(Hp(Player) <(Mxhp(Player) * 0.5)) or(Sp(Player) <(Mxsp(Player) * 0.5)) or ChaIsBoat(Player) == 1 then SystemNotice(Player, "You must not be in a boat and have at least half of your maximum HP and SP in order to teleport.") UseItemFailed(Player) return end if TicketsUse.BlackList[GetChaMapName(Player)] ~= nil and TicketsUse.BlackList[GetChaMapName(Player)].Active == true then SystemNotice(Player, "Cannot use tickets inside ["..TicketsUse.BlackList[GetChaMapName(Player)].Name.."].") UseItemFailed(Player) return end if DelBagItem(Player, ItemID, 1) == 1 then MoveCity(Player, TicketsUse.Ticket[ItemID].Name) else SystemNotice(Player, "Failed to use ["..GetItemName(ItemID).."].") UseItemFailed(Player) return end LG("Ticket System", "Player["..GetChaDefaultName(Player).."] used ["..GetItemName(ItemID).."].") end use this for your tickets
  2. o.o should be , used same src 6months ago with the shared exe and works fine there is bugs but yea fixed most of them so if you are looking to some hints you going look to these bugs #1- Guild exp and states on disband function do not reset in group server , which is when create new guild will take old points of the disbanded guild #2- Disband guild & recreate crash the client > related to first bug, and need a fix of client part.. guild section forms #3- create guild crash client > rebuild refresh mindpower #4-Movement bug states on stun/freeze if player moving #5- some gui bugs above gmnotice in windows/full screen > adjust screen space box for gmnotice< #6-hair npcs & exchanger npc the hover items crash the client >>missing reset the bool on false switch #7-flood buttons/exp/guild color/ addexpguild . spamming sql while many players doing /killing monsters or quests > fix inside groupserver cooldown can fix it smoothly #8- switch item flood crashes all people clients on the range example can be fixed with small cooldown >gameserver or client< #9 register function inside client can be flooded with small bot to fill your database >> small captcha will fix it #10 switch items with 1 slot delete the switched items the fix do not allow the switch with 1 slot only make it 3 or 5 #11- extract gems dupe if had high level inside the item , with > 1 of level gem lv1 this some bugs can be a good hit to start lol but people prefer to spam/do not read
  3. you can find it inside shared "chines src" in this forum but need vs 2003 to can build
  4. i would say to use effect editor much better to edit size /animation etc https://i.gyazo.com/12c634d2d5f05e3d1ff2390d11005a22.gif
  5. local PosX = math.random(556,469) local PosY = math.random(413,352) local Monster = CreateChaEx(1, PosX * 100, PosY * 100, 145, 50, MapCopy) SetChaLifeTime(Monster, 3600)
  6. inside source code it's called insde void CItemCommand::AddHint( int x, int y ){ UIItemCommand.cpp then inside it if(_ItemData.sEndure[1] == 25000 && _ItemData.sEnergy[1] == 0){ PushHint( _pItem->szName, COLOR_WHITE, 5, 1 ); _ShowBody(); return; } and in co they use this line of code if( isWeapon || isDefenceType || isJewelery ||isEquip ){ if ( _ItemData.GetItemLevel() > 0 ){ sprintf( buf, "Lv%d %s",_ItemData.GetItemLevel(), GetName()); }else{ sprintf( buf, "%s", GetName() ); } PushHint( buf, COLOR_WHITE, 5, 1 ); // //item name color > note i just made it as white was black before lol <
  7. Top Game Launcher/Updater with Game Setting and Auto Login Options The updater works with FTP for more info Inbox me or hit me in my Discord:- .✰MoτђaŇŇa✰.#5016
  8. you don't need all of this i guess can be in this simple way if GetSkillLv (role,459) < 1 then --systemnotice here bla bla return end
  9. you can't just copy past without read the code lol its random chance and the example i gave above work for monster id " 66 " you can edit it to what is fine for your files/server etc
  10. Give_ElfEXP ( role , Item_bg , 1 , 0 ) --这里有问题
  11. yes, you can use pko model viewer to checkout models
  12. you can't killl npc but if you mean kill a monster use this small lua function function fairyexp(Player, Fairy) local FairyEXP = GetItemAttr(Fairy, ITEMATTR_ENERGY) local FairyMaxEXP = GetItemAttr(Fairy, ITEMATTR_MAXENERGY) FairyEXP = FairyEXP + 1 if GetItemAttr(Fairy, ITEMATTR_URE) > 49 then if FairyEXP >= FairyMaxEXP then FairyEXP = FairyMaxEXP end SetItemAttr(Fairy, ITEMATTR_ENERGY, FairyEXP) end end function GetExp_New(dead , atk ) local DeadMonster = GetChaID(dead) if DeadMonster == 66 then local Fairy = GetChaItem(atk, 2, 1) if Fairy == nil then return end local FairyType = GetItemType(Fairy) local chance = math.random(1, 100) if FairyType == 59 then if chance >= 50 then fairyexp(atk, Fairy) BickerNotice(atk, "Fairy EXP: Fairy Received x [1] EXP ") end end end end
  13. not sure what do you want but you can try like this local dead_id = GetChaID(dead) local mob = {} mob[715] = {ItemDrop = 3457, Quantity = 1, Quality = 4, Rate = .5} --50% drop mob[716] = {ItemDrop = 3457, Quantity = 1, Quality = 4, Rate = .5} --50% drop mob[717] = {ItemDrop = 3457, Quantity = 1, Quality = 4, Rate = .5} --50% drop if mob[dead_id] ~= nil then if Percentage_Random(mob[dead_id].Rate) == 1 then mob[dead_id].Quantity = math.random(1,10) -- 1 to 10 GiveItemX ( atk, 0, mob[dead_id].ItemDrop, mob[dead_id].Quantity , mob[dead_id].Quality) BickerNotice ( atk, "Received a Kal Runestone! Check your Temp Bag.") end end or you can use like this mob[715] = {ItemDrop = 3457, Quantity = 10, Quality = 4, Rate = .5} mob[dead_id].Quantity = math.random(1,Quantity) --
  14. the model inside iteminfo example 3 Fencing Sword w0003 10100001 01010003 02010003 03010072 //ID Name Icon Name Model (Ground) Model (Lance) Model (Carsise) Model (Phyllis) Model (Ami)
  15. mkhzaleh

    glow bug

    change the yellow mark from 0 to 1 for that effect if effect not following you
  16. when you do copy past from forums you may have extra symbols like this
  17. try this function GetExp_PKM(dead, atk) local MonsterIDs = { [789] = 5000, ---monster id --- gold amount } local monster = GetChaID(dead) for i,v in pairs(MonsterIDs) do if (i == monster) then AddMoney(atk, 0, v) break end end end
  18. missing db tables read @ README@ And add them
  19. else if( _pItem->sType == 46 ) // 勇者之证 { PushHint( _pItem->szName, COLOR_WHITE, 5, 1 ); int show_attr[] = { ITEMATTR_VAL_STR, ITEMATTR_VAL_AGI, ITEMATTR_VAL_DEX, ITEMATTR_VAL_CON, ITEMATTR_VAL_STA }; string show_text[] = { g_oLangRec.GetString(650), g_oLangRec.GetString(651), g_oLangRec.GetString(652), g_oLangRec.GetString(653), g_oLangRec.GetString(654) }; int value = 0; const int count = sizeof(show_attr)/sizeof(show_attr[0]); for( int i=0; i<count; i++ ) { value = item.sInstAttr[show_attr[i]]; item.sInstAttr[show_attr[i]] = 0; sprintf( buf, "%s:%d", show_text[i].c_str(), value ); PushHint( buf, GENERIC_COLOR ); } sprintf( buf, g_oLangRec.GetString(655), _ItemData.sEndure[1] ); PushHint( buf, GENERIC_COLOR ); sprintf( buf, "%s:%d", g_oLangRec.GetString(848), _ItemData.sEnergy[1] ); // 乱斗点数 PushHint( buf, GENERIC_COLOR ); _AddDescriptor(); } inside void CItemCommand::AddHint( int x, int y ) client source code
  20. make sure ur username & password is correct to login use this start system\Game.exe startgame ip:127.0.0.1 autolog:username,password,startgame
  21. pko 1.38 db then use "Readme" to add new column this some of source code development https://www.youtube.com/channel/UCbRPcPr1LYBzJdxPzfzeeOw
  22. https://www.mediafire.com/file/sgob8tvysqcbpvi/gm_panel.tga/file
×
×
  • Create New...