Jump to content

newja

Inactive Member
  • Posts

    52
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Everything posted by newja

  1. M2 Download Center Download Here ( Internal ) Introduction & Small explaination [Hidden Content] As you can see in the video, this function stores XP amount of the last killed mob. Variable is reseted every time you login into the game (including warps). ##### HowTo ##### ######## Open char.cpp and find ######## ######## Open char_battle.cpp and find ######## ######## Open questlua_pc.cpp and add this function ######## ######## Test Quest ######## (notice that this version isn't the same as showed in the video)
  2. He said that {item_id, count} doesn't work in his table. Solution is easy. local index = { [1] = {1111, 5}, [2] = {2222, 4}, [3] = {3333, 3}, } local idx = index[1] syschat("Item ID: ".. idx[1]) syschat("Count: "..idx[2])
  3. Looks more like spawn effect Good job though.
  4. Don't know how to help you, for me everything works. Have you tried restarting machine?
  5. replace wait("") with wait() in your quest and recompile it again.
  6. yep u have right but the mobs yes, how can get the exp of one mob when i kill him? Well, you can't. It's calculated by the GiveExp function. char.h
  7. say("test ã") Won't work. say("test ã ") Will work. Do you understand now?
  8. When you use "say" function or so, remember that you can't place special chars (e.g. ) at the end of line. It doesn't print the error but instead you get no object files.
  9. quest warp begin state start begin when login with pc.getqf("warp") != 1 begin pc.setqf("warp", 1) pc.warp(34744600, 50289600) end end end
  10. [1] = {33493, 4994}, -- chunjo [2] = {xxxxx, xxxx}, -- shinsoo [3] = {xxxxx, xxxx}, -- jinno index[1] is red (coord X) index[2] is green (coord Z)
  11. quest firstport begin state start begin when login with pc.getqf("first") == 0 begin table = { [1] = {33493, 4994}, [2] = {xxxxx, xxxx}, [3] = {xxxxx, xxxx}, } index = table[pc.get_empire()] pc.warp(index[1], index[2]) pc.setqf("first", 1) end end end
  12. lol wut. You need to end your if/else condition. Besides replace 2 last ifs with else if. And if you get compile error, delete last else line.
  13. Don't know what you're talking about guys because I don't have this problem. Post your syserr or tell me exactly in what conditions this happens.
  14. After upgrade or /reload q? Happened to me after reload. This fixed the problem.
  15. If you want to trigger this event while upgrading with scroll you need to do following: Open char_item.cpp and search for this. Now add: quest::CQuestManager::instance().upgrade(GetPlayerID(), item); ######################################################## If you want to get data from actual item such as vnum, bonuses, sockets or slot number (e.g. Upgraded sword from +0 to +1, now you get ID 10 instead of new ID 11, continue reading to change that) you have to change all this: quest::CQuestManager::instance().upgrade(GetPlayerID(), item); with this quest::CQuestManager::instance().upgrade(GetPlayerID(), pkNewItem); Forgot to mention but this event is called only when upgrade is succesfull. Regards, newja
  16. You need to add sockets to the item, it is your ItemShop script part not item_proto, lol.
  17. No need for that, you can use item.vnum in quest to see what was upgraded. Example when upgrade begin if item.vnum =< 19 and item.vnum >= 10 then syschat("Only 10-19 ID is checked") end end Also it's easier to use it with tables than copying 1000 times same phrase (xx.upgrade) with different item id, lol.
  18. Since everyone instantly know how to do it and 0 help was given, there you go my friend: [Hidden Content]
  19. M2 Download Center Download Here ( Internal ) Open char_item.cpp and find: sys_log(0, "PayPee End %d", cost); after this add: quest::CQuestManager::instance().upgrade(GetPlayerID(), pkNewItem); Open quest.h and find: QUEST_ITEM_INFORMER_EVENT, after this add: QUEST_UPGRADE_EVENT, Open questnpc.cpp and find: bool NPC::OnItemInformer(PC& pc, unsigned int vnum) after this add: bool NPC::OnUpgrade(PC& pc, LPITEM item) { return HandleEvent(pc, QUEST_UPGRADE_EVENT); } Open questnpc.h and find: bool OnItemInformer(PC& pc,unsigned int vnum); after this add: bool OnUpgrade(PC& pc,LPITEM item); Open questmanager.cpp and find: m_mapEventName.insert(TEventNameMap::value_type("item_informer", QUEST_ITEM_INFORMER_EVENT)); after this add: m_mapEventName.insert(TEventNameMap::value_type("upgrade", QUEST_UPGRADE_EVENT)); now find: void CQuestManager::ItemInformer(unsigned int pc,unsigned int vnum) after this add: void CQuestManager::upgrade(unsigned int pc, LPITEM item) { PC * pPC; if ((pPC = GetPC(pc))) { if (!CheckQuestLoaded(pPC)) return; SetCurrentItem(item); m_mapNPC[QUEST_NO_NPC].OnUpgrade(*pPC,item); } else sys_err("QUEST no such pc id : %d", pc); } Open questmanager.h and find: void ItemInformer(unsigned int pc, unsigned int vnum); after this add: void upgrade(unsigned int pc, LPITEM item); Example Quest: when upgrade begin vnum = item.vnum - 10 syschat("Sword+"..vnum.." >> Sword+"..vnum+1) end Regards, newja
  20. No ! MrLibya , + I Tell U It Can't Be Made By Quest Only By C++ If you write quest function in C++ then yes, it can be made by quest lol.
  21. Have you defined pet_level? say("Your pet level: "..pc.getqf("pet_"..pc.getqf("pet_item").."_level")) If not, then try it.
  22. There's such a mess in the code, I can't really tell if it's everything now but.. go to char_battle.cpp and find: item->SetOwnership(ch); replace with this if (CBattleArena::instance().IsBattleArenaMap(ch->GetMapIndex()) == false) if (ch->IsPC()) { item->SetOwnership(ch); } else if (ch->IsPet()) { for (CPetSystem::TPetActorMap::iterator go = ch->GetPetSystem()->m_petActorMap.begin();go != ch->GetPetSystem()->m_petActorMap.end(); ++go) { CPetActor* petActor = go->second; if (NULL != petActor) { LPCHARACTER own = petActor->GetOwner(); if (own) { item->SetOwnership(own); } } } } or do as @Deucalion says, however its problem lies deeper than that. Regards, newja
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.