-
Content Count
518 -
Joined
-
Days Won
68
Posts posted by Angelix
-
-
10 minutes ago, KONG said:Angelix, I dont remember too well, but i think their base STR/AGI/CON/etc (stats from characterinfo) may influence their final stats as well.
No worries, I managed to get it working, not as I thought, but I can alter correctly level, HP, dodge, defense, hit rate, attack. Movement and attack speed are a bit off, but it manages to work around a certain arrangement.
And yes, their base stats may be an influence, I created a new character set everything to 1.
-
Did something show up on console or lua_err.txt?
-
9 minutes ago, Totoka said:@Angelix https://goo.gl/izV2BA I won't copy & paste that
It's not new, on a version of ServerDev, someone created a reset system (a few years ago) that placed you back into newbie class, level 1 and may additionally grant a few stat/skill points. Its the same mechanics from ToP's rebirth system, just a bit further with making player level 1 and a newbie. It was first created as an extension of pkoSite and later turned into an NPC script. Can't seem to find the script within resources at the moment.
EDIT: Actually, looking through the resources from MEGA, there is a script like that, kinda messy, but it does the same thing.
-
2 minutes ago, Totoka said:A contradiction?
I am about to run a server like that for someone else, it has very high rates, and based on KOP 2.4, the one which you hate, but downgraded to be like 1.X, coz they want it like that to approach some features from 2.4, to be honest, i dunno if that would work, coz they currently will throw most items through NPC's, also that comes without a hard item drop rate. that mean less $
One thing that they have as unique, or something that I never seen before on Top, do you know the Reset/Rebirth system from Mu Online?
But well, that what they want.
And yeah, I also missing times like that in where I expend like 24 hours a day on TOP during 2 years, with a lot of coke and caffeine
Can you expand on that "Reset/Rebirth" system?
-
1 minute ago, xSeth said:oh i never got in to the high - end stuff in pko ? i'm not a fking slave like u and many others wich play that stupid srv owned by zanka for later get ignored and nothing from it cz will be CLOSED
U fagg ask me abut pro gears in that shet pko but i ask u if u ever got a pro geat or a decent LVL in REAL TOP, TOP 1- TOP 2 , oh but i bet u quit in 5 min after u enter, so u are just a cancer around here like zanka's slaves.
And that dumb bann me everywhere even on forum so imagine if i play pko , he let me get items then BANN without reassons.
And as i read on forum on CA is nobody on just 1 guild pk vs mobs , so ya WOW amazing PK.
Avacado if is protected and good work as a team will be nice one on PK
Others srv type PK not exist so if u got any smart idea tell me or just move to ur slave zanka.
I wonder why you keep getting banned...
- 1
-
Can't understand Russian. Either way, check console or lua_err.txt, they'll give you some leads onto where the problems is. You can share them here and i'll try to help.
-
4 minutes ago, Shako said:I figure "StoneItemType[Baoshi_TypeID][ i ]" is broken, because its calling an array + another value.
edit: nvm, that works. something else is broken.
The script he posted works 100%, it was something else outside the function.
Yes, I kept telling him that the error lines he gave us/me were all pointing either to commented lines or "end". Then he just told me he had place a variable's name twice somewhere else which caused an undefined variable and that he fixed it.
-
Problem seems to be fixed already. @Vasil said he had place a variable's name twice which caused an undefined variable. Not sure if that's true though.
-
Are you completely using cloak? Might as well remove that for the time being till you know how to modify scripts and add it without problems.
-
-
Just now, Vasil said:Sacred PKO.
My bad, typo. I meant the whole function where the line with error belongs to.
-
-
-
7 hours ago, V3ct0r said:Hello @Angelix!
There is two functions to get and set attributes of character:
GetChaAttr(role, ATTR_TYPE) -- Get a character attribute ATTR_TYPE
and
SetChaAttr(role, ATTR_TYPE, number) -- Set a character attribute ATTR_TYPE to number
ATTR_TYPE is a attribute ID. For example, ATTR_HP is current HP of character, ATTR_MXHP is max HP. ATTR_LV is level. You can see all attributes in file AttrType.luaYes, so far I'm able to properly get a character's attributes correct, the thing is, when trying to applying them to a monster, things go slightly wrong.
I created a replica of an Abyss Lord and set its attributes to 0 or 1 on some cases via CharacterInfo.txt.
So if I do this:
Value = GetChaAttr(Player, ATTR_MNATK)
And then do this:
SetCharaAttr(Value, Monster, ATTR_MNATK)
The monster's MNATK will not go accordingly to the value, yet if I do this:
SetCharaAttr(Value, Monster, ATTR_STATEV_MNATK)
It seem that it does reflect in-game the according attribute and deal a considerably amount of damage.
With "ATTR_MNATK" it dealt damage from 1 ~ 10 on a 2k defense while with "ATTR_STATEV_MNATK" it deals around 200 damage on same defense.
EDIT: So far I have the basic attributes down, still having some problems copying ASPD and MSPD though.
-
How can I get a player's attribute (MNATK/MNATK, DEF, FLEE, HIT, ASPD, MSPD & PDEF) and give them to a monster?
I'm trying to create a copy (attribute-wise) of a player (or average of players) and summon it.
First I'd have to get attributes of players and average, summon monster (CreateCha) and set the stats. How can I set the stats correctly?
Thanks for any information given.
-
56 minutes ago, KONG said:@Angelix i suggest using a version control software so all edits can be monitored and viewed, and even rollback.
What kind of software? Never used one before. I merely do trial and error thing by thing, I rarely modify a bunch of code without testing, today I did and something went wrong, haha.
-
39 minutes ago, Totoka said:kop 2.4
GetExp_New -> GetExp_PKM -> ShareTeamExp
there are more variants between each, but that seems to be the experience flow
edit: using a tool like WinMerge, or similar can be a good start to check your changes against an old version
Thanks! You save me hours of scripting again, haha.
Apparently, while trying to remove useless scripts and add a custom feature, I accidentally deleted "GetExp_PKM(dead, atk)" and I didn't notice, haha. Thanks again!
-
What functions interfere with the process of giving EXP when killing a monster? I did many modifications and can't backtrack quite right. The thing is, I'm not receiving any EXP, no errors show up on console nor lua_err.txt. Any clues? Thanks!
-
What's the difference between those files and the current v1.x and v2.x ?
-
This is done by assigning an area to your map and then assign a sound to that area within AreaSet if I remember correctly.
-
2 hours ago, KONG said:I am sure though may be wrong, Donation() and Donation = {} will collide.
Well not collide, but the first condition:if Donation == nil then
will never execute because Donation will always exist due to the function also being called DonationWell, 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.
- 1
-
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.
- 1
-
When you summon a monster, just below it place the announcement.
[LUA] Auto Respawn Script
in Server
Posted · Edited by Angelix · Report reply
I think clerics can't revive them as they aren't determined "friendly", regardless if they are in same party/guild. That's if the person has setup the correct type of map.
This should work, haven't been tested.
--[[ DealAllPlayerInMap(map_copy, "AutoMapRevive") ]] function AutoMapRevive(Player) local MapReviveTimer = 20 if MapRevive == nil then MapRevive = {} end if MapRevive[GetRoleID(Player)] == nil or IsChaLiving(Player) == 1 then MapRevive[GetRoleID(Player)] = MapReviveTimer end if IsChaLiving(Player) ~= 1 then if MapRevive[GetRoleID(Player)] == 0 then MoveCity(Player, "") MapRevive[GetRoleID(Player)] = MapReviveTimer else SystemNotice(Player, "You're being revived in "..MapRevive[GetRoleID(Player)].." second(s).") MapRevive[GetRoleID(Player)] = MapRevive[GetRoleID(Player)] - 1 end end end