Jump to content

Angelix

Community
  • Content Count

    518
  • Joined

  • Last visited

  • Days Won

    68

Everything posted by Angelix

  1. Well, just a typo then, sorry haha Either way, he'll need to change that a bit and add the NPC functions to their respective scripts in order to use that NPC. It's just a base if that's what he's looking for.
  2. Something like this? Donation() function Donation() if Donation == nil then Donation = {} Donation.Player = {} Donation.Total = {Amount = 0, Times = 0} Donation.Top = {} Donation.Top.First = nil Donation.Top.Second = nil Donation.Top.Third = nil end end function Donate(Player, Amount) local PlayerName = GetChaDefaultName(Player) if Donation.Player[PlayerName] = nil then Donation.Player[PlayerName] = {Times = 0, Amount = 0} end Donation.Player[PlayerName].Times = Donation.Player[PlayerName].Times + 1 Donation.Player[PlayerName].Amount = Donation.Player[PlayerName].Amount + Amount Donation.Total.Times = Donation.Total.Times + 1 Donation.Total.Amount = Donation.Total.Amount + Amount end function SortDonation(Type) if Type == 1 then for Name, Var in next, Donation.Player do if Var.Amount > Donation.Player[Donation.Top.First].Amount then Donation.Top.Third = Donation.Top.Second Donation.Top.Second = Donation.Top.First Donation.Top.First = Name elseif Var.Amount > Donation.Player[Donation.Top.Second].Amount then Donation.Top.Third = Donation.Top.Second Donation.Top.Second = Name elseif Var.Amount > Donation.Player[Donation.Top.Third].Amount then Donation.Top.Third = Name end end elseif Type == 2 then for Name, Var in next, Donation.Player do if Var.Times > Donation.Player[Donation.Top.First].Times then Donation.Top.Third = Donation.Top.Second Donation.Top.Second = Donation.Top.First Donation.Top.First = Name elseif Var.Times > Donation.Player[Donation.Top.Second].Times then Donation.Top.Third = Donation.Top.Second Donation.Top.Second = Name elseif Var.Times > Donation.Player[Donation.Top.Third].Times then Donation.Top.Third = Name end end end end function DonationNPC() Text(1, "Donate", JumpPage, 2) Text(1, "Total Donated", JumpPage, 3) Text(1, "Top Donators", JumpPage, 4) Text(2, "Donate: 1,000G", Donate, 1000) Text(2, "Donate: 10,000G", Donate, 10000) Text(2, "Donate: 100,000G", Donate, 100000) Talk(3, "Total amount donated: "..Donation.Total.Amount..", total times donated: "..Donation.Total.Times) InitTrigger() TriggerAction(1, SortDonation, 1) TriggerAction(1, JumpPage, 5) Text(4, "TOP Donators: Amount", MultiTrigger, GetMultiTrigger(), 1) InitTrigger() TriggerAction(1, SortDonation, 2) TriggerAction(1, JumpPage, 6) Text(4, "TOP Donators: Times", MultiTrigger, GetMultiTrigger(), 1) Talk(5, "TOP Donators\n Place Player Amount\n #1 "..Donation.Top.First.." "..Donation.Player[Donation.Top.First].Amount.."\n #2 "..Donation.Top.Second.." "..Donation.Player[Donation.Top.Second].Amount.."\n #3 "..Donation.Top.Third.." "..Donation.Player[Donation.Top.Third].Amount.."\n") Talk(6, "TOP Donators\n Place Player Times\n #1 "..Donation.Top.First.." "..Donation.Player[Donation.Top.First].Times.."\n #2 "..Donation.Top.Second.." "..Donation.Player[Donation.Top.Second].Times.."\n #3 "..Donation.Top.Third.." "..Donation.Player[Donation.Top.Third].Times.."\n") end It probably ain't a working code, but you get the basic idea.
  3. You can remove the monster from that and summon it through a function and use variables to record its state, check when it's dead and when it should revive according to your timer.
  4. When you summon a monster, just below it place the announcement.
  5. I modified all of them to 4 including the map I wanted, now it works though.
  6. Map copies can't be defined within ctrl.lua in v2.x files, if I do, in lua_err it shows "MapCopyNum" as an undefined function. And no worries, I think I already got it working. Was able to open CA with 2 copies and it didn't get bugged, characters didn't see each other and scripts worked fine. After hours of trying to figure it out, it seems I have to add a new line within MapCopySet.txt and increase the last number of all the entries, I was missing that and caused it to fail. Will post an example once I have my computer. EDIT: I was trying with: 0 teampk 200 3 1 kyjj_1 50 3 2 kyjj_2 50 3 3 kyjj_3 50 3 4 garner2 10 3 And it didn't work out, map kept getting bugged and so on. Then I after hours, I finally tried this: 0 teampk 200 4 1 kyjj_1 50 4 2 kyjj_2 50 4 3 kyjj_3 50 4 4 garner2 10 4 And that seems to work fine, no more problems.
  7. Yes, I tried placing there 5 copies of a map, but when I try sending a player to map copy #3, it gets bugged. I have this: 0 teampk 200 3 1 kyjj_1 50 3 2 kyjj_2 50 3 3 kyjj_3 50 3 What does the consecutive "3" mean?
  8. Sorry for reviving an old thread and going off-topic, but how did you manage to get map copies working on v2.X files? I can't seem to send a player to different map copies.
  9. Seeing as in how I haven't received an answer in almost 24 hours, let me elaborate a bit more on the map copies. I'm trying to set up a map that can work on multiple instances at a time (map copies) some how like team pk (argent bar PvP). I can't get them to work right, since I don't know how to send players to individual copies of the map. If I try sending player A to map copy #1 by using "MoveCity(Player, <MAP_NAME>, 1)" and then sending player B to map copy #2 with "MoveCity(Player, <MAP_NAME>, 2)", they end up on the same map and after some seconds, I can't seem to move without getting a roll back, can't do anything at that point and eventually have to close/open client again or switch character. Any ideas on how to work with map copies? Thanks.
  10. I'd like to ask a few questions: 1. Has anyone gotten a working in-game shop for v2.X? If so, mind sharing? 2. How are map copies handled in v2.X? Does the parameter "mapcopy" work as a role or as a number?
  11. I think there's also a limit with the scripts, I don't remember the exact limit, but you can find it in forge.lua though.
  12. No, they don't work the same way. At some point your CharacterInfo will differ from other user's CharacterInfo. What if you have Var[50] = "X" in your library and their CharacterInfo has Y for a name on monster #50, when they try your code, they'll get "X" instead of "Y" when trying too call monster #50's name.
  13. I'd like a Spanish section as well, but as you said, it will only divide community to some degree though.
  14. So what was the bug and what is the fix?
  15. Yes, but there's a catch with that. First of, the way the game currently handles the possession effect is that it removes completely ANY stats (STATEV) regardless whether it was given from possession or any other effect. Second, it could semi work the way you say it, but what if a player has level 30 fairy and uses poss and gains an additional 30 points and you record 30 points, then if player switches fairy to a level 40 and teleport or uses portal, the player will get the effect of the level 40 fairy, yet when the possession finishes, it will only take 30 points since you only recorded that and not the refresh player got from teleport. Give it a try, use possession on a level 30 fairy, switch to 40 and then teleport, your stats will get refresh according to the current fairy.
  16. When using effects like those and possession, you'll always get decreasing stats. Since possession always sets attributes to 0 when finished and other effects just remove their X bonus since it's static, it will remove them even if you don't have them, resulting in negative stats.
  17. If I remember correctly, it's the same way you get a player's name, that's if you have their role.
  18. Angelix

    Some concerns.

    Thanks for clarifying, and if it can be translated, it could be a bit better!
  19. I found these within MissionSdk.lua: TE_MAPINIT = 0 TE_NPC = 1 TE_KILL = 2 TE_GAMETIME = 3 TE_CHAT = 4 TE_GETITEM = 5 TE_EQUIPITEM = 6 TE_GOTO_MAP = 7 TE_LEVELUP = 8 Anyone know how to use them? So far quests only use 2 and 5, I think voyager's second class may use 2, other than that I haven't seen the rest.
  20. Is there a way to make new kind of quests? Like making a player get X amount of player kills (PK), kills monsters in X map, use X item, enter X map or something as such?
  21. Angelix

    Some concerns.

    First: I'd like to mention that I love the dar theme, but would you mind fixing it? When writing like the thread title, the letters don't show even if they are there. Maybe the font color is white or something. Second: The forum mini game you have popping up everywhere is annoying, not by the fact that it's very intrusive, but by the fact it is being deployed in the whole forum, even in the English section and I can't understand anything of it, at least translate it please.
  22. One day? It might seem basic, yet you don't know how to do it, so how is it basic? A lot of people with knowledge started the same, just because they didn't get answers on a forum didn't mean they gave up, they started looking how scripts worked and eventually worked them out or found a way around it. That didn't take one day, it might of took a week even to understand everything completely.
  23. @Faller, No problem, I'm glad it was of help. Did you also edit the text file within the resource folder? You should look for a decompiler or simply get a decompiled one from another place, edit it to you liking and compile it using "table_bin". That check is to see if the player has that item within bank, if you want to restrict access to map if a player has that item, then if the condition returns "LUA_TRUE", then you should put "return 0" in order for player not being able to enter. Give me a heads up if it worked.
  24. Can't go further lv120 with Leveling Cards nor EXP Pamps, just GM Commands. Did you also modify the text file and level limit place on Init_Attr? Some effects are bugged, for example: Rebirth Angels auras are showing vertically. Also some other effects are being shown on incorrect potions. Your effects are screwed because the numbers are wrong within ScenEffectInfo or SceneObjInfo. First of all, you can either go look into other client files and see which one best suits you. Another way to fix it is by finding whatever calls that effect, in your case a "Rebirth Angel". Go to that character's CharacterInfo line and check for their effect and then look it up on the files mentioned before, Play around with the numbers, compile and check if it suits you. I think the same should apply for potions, yet they work with SkillEff, look up the potion's effect and see what effect is called upon and same procedure as before. Are there any ways to check character's bank items on maze requirements? There should be, as someone mentioned before, you can use something I got from a script here on forum. The scripts is down below. Whereas "X" refers to the number slots you want to check, could 24 for a normal player inventory or even up to 48 if they have increase, you can also potentially use "GetKbCap(Player)" instead of a number there and it will always return the size of the player's inventory. Since you are looking into a bank inventory, I guess you can leave it at a default 48 there. Next up is "Y", if you put the value of 2 there, it will check a player's inventory, maybe play a bit and try with 0 or 1 (this seems to be your current equipment, goes from 0 - 9 or 13), I guess you can even check for a player's temporary inventory. Finally "Z" will be the item's ID you will searching for, if it matches, then you just place your code there. for i = 0, X, 1 do if GetItemID(GetChaItem(Player, Y, i)) == Z then -- Your script here. end end The rest of your questions are out of my knowledge, sorry. Mandatory edit: Just to clarify something about checking a bank inventory, I got curios and tried to see for myself, to my surprise, what I said didn't work at all, yet I did found an interesting function which will help you. The value of "X" is the item's ID while "Y" is the amount, if a player has Y (or more) amount of X item then it will return 1 (LUA_TRUE), if it has less, then if will return 0 (LUA_FALSE). if BankHasItem(Player, X, Y) == 1 then -- Your code here. end Hope that helps.
  25. Would you mind posting your scripts and indicate if any error appears within GS console or on logs.
×
×
  • Create New...