Jump to content

Tasho

Banned
  • Posts

    358
  • Joined

  • Last visited

  • Days Won

    11
  • Feedback

    0%

Everything posted by Tasho

  1. I not understand very well what you want but that should be. inputDay = raw_input("Put the days that you want to buy your car there: ") def rental_car_cost(): if inputDay.isdigit(): cost = int(inputDay) * 40 if inputDay >= 7: print cost - 50 elif inputDay >= 3: print cost - 20 else: print 0 # something else else: print "The data type must be numbers integers." rental_car_cost() Here you can test it: [Hidden Content]
  2. [Hidden Content] I think he speak about this system from Rubinum, but i dont know if is possible to do with lua (real time for all channels and select all players data) because there need to check all players from all channels and check them language if is en, de or if is global, and send it with special colors, block to send message etc. (like this screen, i find on patchlog of them) =
  3. Yeah it's same but there we speak just about "good practices". I was know already that, doesn't importantly the else return (in this case) it was just useless coding, but i did that that without to think. Now should be ok, thanks.
  4. PS: I didn't tested, but should working. 1. Command mysql (if you want to reset for all people): UPDATE player.quest SET lValue = 0 WHERE szName LIKE ('%collect_quest_lv%') AND szState = 'duration'; 2. Quest (if you want for people can do that alone, you can put like via a special item etc): quest biolog begin state start begin function remove_time() local biologistDict = { "collect_quest_lv30", "collect_quest_lv40", "collect_quest_lv50", "collect_quest_lv60", "collect_quest_lv70", "collect_quest_lv80", "collect_quest_lv85", "collect_quest_lv90", "collect_quest_lv92", "collect_quest_lv94" } for questName = 1, table.getn(biologistDict) do pc.setf(biologistDict[questName], "duration", 0) -- SetFlag(questName + "." + stateName, iValue); syschat(string.format("pc.setf(%s.duration, 0)", biologistDict[questName])) end end when 20084.chat."Reset biologist time" begin say_title("Biologist:") say("Are you sure you want to do that?") if (select("Yes", "Not now") == 1) then biolog.remove_time() end end end end
  5. This topic need to be removed, I do not think such things like hacking, decryption, leak are allowed here, so we can't help you with this.
  6. Then go and make a dbg on class where is opened for can be sure is called or is problem with your uiscript (some keys failed) and can't show and not all time show something on syserr. root/uiSystem.py (replace the function OpenDialog) with this: def OpenDialog(self): import chat chat.AppendChat(chat.CHAT_TYPE_INFO, "uiSystem.SystemDialog().OpenDialog()") self.Show() If he show you message and not appear the window that means you have problem in ../SystemDialog.py (uiscript or locale) You can try also with: #self.Show() ui.ScriptWindow.Show(self)
  7. Be sure you have same on root/game.py def OnPressEscapeKey(self): if app.TARGET == app.GetCursor(): app.SetCursor(app.NORMAL) elif TRUE == mouseModule.mouseController.isAttached(): mouseModule.mouseController.DeattachObject() else: self.interface.OpenSystemDialog() return TRUE
  8. @danio475 Where is scope of break in this loop? You did a loop and check if not wear stop the loop without do nothing, so this loop not have sense. return wear[i]; You can't do that because "i" is not declared. Should look like this what you say. else if (GetWearFlag() & WEARABLE_UNIQUE) { BYTE WEAR_EQ_LIST[4] = { WEAR_UNIQUE1, WEAR_UNIQUE2, WEAR_UNIQUE3, WEAR_UNIQUE4 }; for (BYTE i=0; i<_countof(WEAR_EQ_LIST); i++) { BYTE bCell = WEAR_EQ_LIST[i]; if (!ch->GetWear(bCell)) return bCell; } }
  9. Try this. #@root/uiInventory.py #Search for: def OnPickMoney(self, money): mouseModule.mouseController.AttachMoney(self, player.SLOT_TYPE_INVENTORY, money) #Add after: def RefreshSlotAcce(self): [self.wndEquip.SetItemSlot(item.COSTUME_SLOT_START + i, player.GetItemIndex(item.COSTUME_SLOT_START + i), 0) for i in xrange(item.COSTUME_SLOT_COUNT)] self.wndEquip.RefreshSlot() #Search in class InventoryWindow(ui.ScriptWindow): def Show(self): self.__LoadWindow() #Add after: self.RefreshSlotAcce() #Search in def RefreshEquipSlotWindow(self): self.wndEquip.RefreshSlot() #Add after: self.RefreshSlotAcce() #@locale/xx/InventoryWindow.py #Search for: "slot" : ( #Add after: {"index": item.COSTUME_SLOT_START + 2, "x": 80, "y": 3, "width":32, "height": 32},
  10. quest coins_for_kill begin state start begin when kill begin local mobVnum = npc.get_race() local mobCoins = ({ [8024] = 30, -- 30 Coins [8025] = 20 -- 20 Coins }) [mobVnum] if not mobCoins then return end pc.charge_cash(mobCoins, "coins_for_kill") syschat(string.format("You get %d coins from %s.", mobCoins, mob_name(mobVnum))) end end end This is correctly quest rewrited. Already ymir did the function for lua to charge the coins via pc.charge_cash, but not all people was used because name of row is called: "cash" and they are used on website/itemshop etc row "coins", but can change very easy. Go in /src/db/ClientManager.cpp sprintf(szQuery, "update account set `cash` = `cash` + %d where id = %d limit 1", packet->dwAmount, packet->dwAID); Replace `cash` = `cash` with `coins` = `coins`
  11. So, __AttachSelectEffectPVP() is member of class CInstanceBase same with GetDuelMode(). You need to change like this: if (GetDuelMode()) __AttachSelectEffectPVP();
  12. CInstanceBase* pInstance = CPythonPlayer::Instance().NEW_GetMainActorPtr(); if (pInstance->GetDuelMode()) // do something you are in duel You was try with this?
  13. //Soure/Client/UserInterface/InstanceBaseEffect.cpp //Search for: strDamageType = "target_"; //Replace with: strDamageType = (flag & DAMAGE_CRITICAL) ? "target_crit_" : "target_"; d:/ymir work/effect/affect/damagevalue/ [Hidden Content]
  14. //Source/Client/InstanceBase.cpp Search and delete "//" from: //rkEftMgr.CreateEffect(ms_adwCRCAffectEffect[EFFECT_DAMAGE_CRITICAL],v3Pos,v3Rot); Location effect: d:/ymir work/effect/affect/damagevalue/critical.mse Download effect: [Hidden Content] Also is here:
  15. Hi there, I just came acorss a problem that I didnt figure out how to resolve and maybe you guys know something about it. I implemented on a new client a interface and it looks like this : New client: if you look carefully you can see that there are 1px distance beteween the frames and the center. Old client: Here you can see that its all normal. The problem is somewhere in the client source, I tested with the old client launcher and it show the image normally. #Solved Problem was directx.
  16. Is same code. //char_skill.cpp bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster) { if (IsPC() && IsPolymorphed() && pkVictim->IsPC()) { RemoveAffect(AFFECT_POLYMORPH); ChatPacket(CHAT_TYPE_INFO, "Transformarea in modul PVP este interzisa!"); } [..........................................] }
  17. Because you need to use a block condition. ( { } ) if (IsPC() && IsPolymorphed() && pkVictim->IsPC()) { RemoveAffect(AFFECT_POLYMORPH); ChatPacket(CHAT_TYPE_INFO, "Transformarea in modul PVP este interzisa!"); }
  18. if (IsPC() && IsPolymorphed() && pkVictim->IsPC())
  19. Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines. const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef(); if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK)) return FALSE; Also the check is already exist, just need to copy-paste check from: bool CInstanceBase::IsInSafe() // InstanceBase.cpp Original idea is from: Rubinum2. PS: Here is nothing to coding, is just copy 3 lines from other part and put in this part. ", you just copy also them idea and + title name video from rubinum. i will release a code of mine "
  20. Yeah i know, was just for other shit things, sorry. You can do it like this, without loop. if selected then [.......] end Or you can remove without check selected and without any loops. quest offline_message begin state start begin when 9006.chat."Select lang" with pc.getqf("selected") == 0 begin say_title(mob_name(npc.get_race())..":") say("") local selected = select("Magyar", "English", "Deutsch") pc.setqf("lang", selected) pc.setqf("selected", 1) say(translate[pc.getqf("lang")].offline_msg.notice) end end end end
  21. 300+ lines for translate and exist 3 quests per language..omg. I will prefer much better something like this: translate[1].offline_msg = {} translate[1].offline_msg.notice = "Választott nyelv: Magyar!" translate[2].offline_msg = {} translate[2].offline_msg.notice = "Language selected: English!" translate[3].offline_msg = {} translate[3].offline_msg.notice = "Sprache gewählt: Deutsch!" And quest for select need to look like this: quest offline_message begin state start begin when 9006.chat."Select lang" with pc.getqf("selected") == 0 begin say_title(mob_name(npc.get_race())..":") say("") local selected = select("Magyar", "English", "Deutsch") for key = 1, 3 do if selected == key then pc.setqf("lang", key) pc.setqf("selected", 1) say(translate[pc.getqf("lang")].offline_msg.notice) end end end end end And now you can call all with: say(translate[pc.getqf("lang")].offline_msg.name)
  22. " Dude... " there are defines from ../quest/questnpc.txt 20348 deviltower_man
×
×
  • 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.