PDA

View Full Version : [HELP] Creating Karma-Eating Summon


Osito2Dancer
17.03.2006, 17:36
Im currently developing a "Karma Eating summon" for the "Sin Eater" quest. Basically, its just this:

1º If you have Karma, this monster halves it based on a timer.

2º If you die, monster dispawns.

3º If your Karma == 0, monster dispawns.

Points 2 and 3 are done, quite easy (guard ai, summon siege golem ai and a little knowledge on AI are key to these points) but point 1 is kinda tricky. Cant find the constant for "karma modification", so i can use "IncrementParam" function on AI. So, i ask you elite AI editors for help. Maybe IncrementParam isn't the way to go, but hey, its a start xD.

Of course, upon finishing this AI, ill share it with proper credits for all of those who could help me.

So, thats the problem. Anyone care to step up to the challenge?

Atte

Oso

testdude
17.03.2006, 17:48
[PARAM_EXP] = 0
[PARAM_SP] = 1
[PARAM_INT] = 2
[PARAM_STR] = 3
[PARAM_CON] = 4
[PARAM_MEN] = 5
[PARAM_DEX] = 6
[PARAM_WIT] = 7
[PARAM_LEVEL] = 8

i dont think IncrementParam can be used on karma... i wanted to do such a thing for PK count but couldnt -.-

Osito2Dancer
17.03.2006, 17:51
humm. Tried adding the "PARAM_KARMA" on manual_pch.txt?

Oso

testdude
17.03.2006, 17:56
would probably need hexing into the l2server to read it as a param, and maybe l2npc also...

Osito2Dancer
17.03.2006, 18:00
Well, i'll leave this open for any suggestions. If someone else knows or has managed to do a "karma eating" summon, please help Y_Y.

Oso

DarkGoat
17.03.2006, 18:13
is karma loss based on exp gained? like normally?

Metalmurphy
17.03.2006, 18:13
Ur mistaking Karma with PK counts, The summon decreases ur PK count not ur Karma, and imo this can't be done with the servers we have.

Osito2Dancer
17.03.2006, 18:14
is karma loss based on exp gained? like normally?
PC_parameter.txt has a lead on this. I think is something like that, because lower mobs wont clean your karma.

Oso

Osito2Dancer
17.03.2006, 18:16
Ur mistaking Karma with PK counts, The summon decreases ur PK count not ur Karma, and imo this can't be done with the servers we have.
I know its PK counters, but i thought that karma would be easier to achieve than that. Just an idea for a more "official" server, but relying on the "limitations" of the current server.

And i thought that this could be possible, the Quest part is the hardest, and this is just a damn int constant missing issue Y_Y.

Oso

OnlyOne
17.03.2006, 19:07
another sollution is after partying with karma eater it gives you quest item and when you restart server run query which remove karma/pk_count and deletes item ;)

filrip
17.03.2006, 19:33
i havent understand exactly what you want to do (so sorry if i answer wrong) but you can modify/read karma of players by creature.karma in AI

the condition of your 1° seems to be the opposite of the 3°
that's why i have suddenly badly understand what you want to do because if you have already coded 3°, the 1° doesn't seems to be a problem

Mattho
17.03.2006, 19:46
What about this...
just an idea(!)
Player losing karma when dies > losing exp
so maybe if you will make AI which will removing your experiences, that will be removing karma. Of course that ai will add lost experiences back...

Osito2Dancer
17.03.2006, 20:58
i havent understand exactly what you want to do (so sorry if i answer wrong) but you can modify/read karma of players by creature.karma in AI

the condition of your 1° seems to be the opposite of the 3°
that's why i have suddenly badly understand what you want to do because if you have already coded 3°, the 1° doesn't seems to be a problem
The thing is this:

You have 5000 karma, and summon this NPC. Whenever 2 minutes go by, the karma gets reduced to a half of the current karma counter. This goes by until:

1) you die
2) your karma goes to 0
3) the summon gets killed

Until then, the summon will eat your karma. Thats all.

Whats that creature.karma?

Oso

DarkGoat
17.03.2006, 22:38
can any 1 explain how it works on retail?
i think the item idea is the best solution...make it so every X(dont know) minutes you recieve a special item, u can make a php script to delete these items and reduce the pk counter of the owner

creature.karma is the amount of karma...

Osito2Dancer
18.03.2006, 00:31
can any 1 explain how it works on retail?
i think the item idea is the best solution...make it so every X(dont know) minutes you recieve a special item, u can make a php script to delete these items and reduce the pk counter of the owner

creature.karma is the amount of karma...
I figured it out, but how can someone EDIT karma by AI? thats my question.

The ITEM idea was cool, it's easy to implement and such ^^.

Oso

Osito2Dancer
27.03.2006, 04:47
Nothing on this?

Oso

Stazis
27.03.2006, 09:39
creature.karma

it is in NASC synopsis - so use NASC to compile some code with this variable and you will see AI compiled code for variable and func_call

Osito2Dancer
27.03.2006, 14:59
creature.karma

it is in NASC synopsis - so use NASC to compile some code with this variable and you will see AI compiled code for variable and func_call
Maybe im not getting it, but ill give it a try explaining my PoV:

1º I've already gotten the summon to detect if i have karma or not, so that point is covered.
2º It summons, it works.
3º I cant get it to DELETE THE PHK KARMA xD.

Creature.karma only gives pointers on how to detect karma, not on HOW to decrease it. Thats my problem.

Atte

Oso