Hi, i'm running an L2 Server and i would like to edit and modify AI.obj.
Where can i find something that explains the functions and vars of this file?
Thanks =)
Printable View
Hi, i'm running an L2 Server and i would like to edit and modify AI.obj.
Where can i find something that explains the functions and vars of this file?
Thanks =)
Try using search, im quite sure it has already been discussed.
Yours.
EntroX
why u dont u read before post this fck shit :D, oh yeah iam on fire xD
u only need common sense
The following info was posted by Digital on PP forums
I hope that guys from PP will not BS at me for that
func_call 0 // func[AddMoveAroundDesire]
func_call 1 // func[AddDoNothingDesire]
func_call 2 // func[AddAttackDesire]
func_call 3 // func[AddAttackDesireEx]
func_call 6 // func[AddFleeDesire]
func_call 7 // func[AddFollowDesire]
func_call 9 // func[AddMoveToWayPointDesire]
func_call 10 // func[AddUseSkillDesire]
func_call 11 // func[AddUseSkillDesireEx]
func_call 12 // func[AddMoveToDesire]
func_call 13 // func[AddEffectActionDesire]
func_call 14 // func[AddPetDefaultDesire_Follow]
func_call 15 // func[RemoveAllAttackDesire]
func_call 18 // func[MakeAttackEvent]
func_call 20 // func[GetLifeTime]
func_call 21 // func[GetTick]
func_call 23 // func[GetCurrentTick]
func_call 24 // func[GetDirection]
func_call 25 // func[SetCookie]
func_call 26 // func[GetCookie]
func_call 27 // func[SetTeleportPosOnLost]
func_call 28 // func[AddTimerEx]
func_call 29 // func[GetIndexFromCreature]
func_call 30 // func[GetCreatureFromIndex]
func_call 31 // func[RegisterGlobalMap]
func_call 32 // func[UnregisterGlobalMap]
func_call 33 // func[GetGlobalMap]
func_call 34 // func[SendScriptEvent]
func_call 36 // func[IsSpoiled]
func_call 37 // func[Say]
func_call 42 // func[Shout]
func_call 43 // func[ShowPage]
func_call 45 // func[Teleport]
func_call 46 // func[InstantTeleport]
func_call 47 // func[Sell]
func_call 48 // func[Buy]
func_call 51 // func[DistFromMe]
func_call 52 // func[SetTimerPeriodByTick]
func_call 53 // func[SetTimerPeriod]
func_call 54 // func[GetWayPointDelay]
func_call 55 // func[Rand]
func_call 57 // func[FloatToInt]
func_call 58 // func[GetMemoCount]
func_call 59 // func[HaveMemo]
func_call 60 // func[SetMemo]
func_call 61 // func[SetMemoState]
func_call 62 // func[GetMemoState]
func_call 63 // func[RemoveMemo]
func_call 64 // func[SetJournal]
func_call 65 // func[GetOneTimeQuestFlag]
func_call 66 // func[SetOneTimeQuestFlag]
func_call 67 // func[GetAbnormalLevel]
func_call 68 // func[SetDBValue]
func_call 74 // func[Pledge_GetLeader]
func_call 76 // func[GetPledge]
func_call 77 // func[GiveItem1]
func_call 80 // func[DeleteItem1]
func_call 81 // func[OwnItemCount]
func_call 83 // func[GetLastAttacker]
func_call 84 // func[FHTML_SetFileName]
func_call 85 // func[FHTML_SetInt]
func_call 86 // func[FHTML_SetFloat]
func_call 87 // func[FHTML_SetStr]
func_call 88 // func[ShowFHTML]
func_call 89 // func[MakeFString]
func_call 100 // func[IsMyLord]
func_call 103 // func[Castle_GetSiegeTime]
func_call 104 // func[Residence_GetTaxRate]
func_call 105 // func[Residence_GetTaxRateCurrent]
func_call 106 // func[Residence_SetTaxRate]
func_call 111 // func[Residence_VaultTakeOutMoney]
func_call 114 // func[Castle_GateOpenClose]
func_call 115 // func[Castle_GetPledgeState]
func_call 116 // func[Castle_IsUnderSiege]
func_call 117 // func[Castle_GetHPRegen]
func_call 118 // func[Castle_GetMPRegen]
func_call 119 // func[Castle_BanishOthers]
func_call 120 // func[Castle_SetHPRegen]
func_call 121 // func[Castle_SetMPRegen]
func_call 122 // func[Castle_GetRawSiegeTime]
func_call 123 // func[Castle_GetRawSystemTime]
func_call 125 // func[Castle_GateOpenClose2]
func_call 126 // func[Castle_GetPledgeId]
func_call 127 // func[Castle_GetLifeControlLevel]
func_call 128 // func[Agit_SetMaster]
func_call 129 // func[Agit_GetTeleportLevel]
func_call 130 // func[Agit_SetTeleportLevel]
func_call 131 // func[AddChoice]
func_call 132 // func[ShowChoicePage]
func_call 133 // func[ShowSkillList]
func_call 134 // func[ShowGrowSkillMessage]
func_call 143 // func[IsInCategory]
func_call 144 // func[ClassChange]
func_call 145 // func[Castle_GetCropRate]
func_call 146 // func[Castle_GetCropPrice]
func_call 148 // func[Residence_GetTaxIncome]
func_call 152 // func[Castle_PostCropPurchase]
func_call 154 // func[Skill_GetConsumeHP]
func_call 155 // func[Skill_GetConsumeMP]
func_call 156 // func[Skill_GetEffectPoint]
func_call 157 // func[Skill_GetAttribute]
func_call 158 // func[Skill_GetAbnormalType]
func_call 160 // func[Skill_InReuseDelay]
func_call 165 // func[CreatePrivates]
func_call 166 // func[CreateOnePrivate]
func_call 168 // func[Maker_GetNpcCount]
func_call 169 // func[Maker_FindNpcByKey]
func_call 170 // func[CreateOnePrivateEx]
func_call 171 // func[IncrementParam]
func_call 173 // func[SoundEffect]
func_call 174 // func[EffectMusic]
func_call 175 // func[Despawn]
func_call 177 // func[InMyTerritory]
func_call 178 // func[InstantTeleportInMyTerritory]
func_call 180 // func[EarthQuakeByNPC]
func_call 181 // func[SpecialCamera]
func_call 184 // func[PledgeLevelUp]
func_call 188 // func[ShowTutorialHTML]
func_call 189 // func[ShowTutorialHTML2]
func_call 190 // func[ShowQuestionMark]
func_call 192 // func[CloseTutorialHTML]
func_call 193 // func[EnableTutorialEvent]
func_call 194 // func[ShowRadar]
func_call 195 // func[DeleteRadar]
func_call 196 // func[CreatePet]
func_call 200 // func[OpenSiegeInfo]
func_call 201 // func[SetDoorHpLevel]
func_call 202 // func[GetDoorHpLevel]
func_call 203 // func[SetControlTowerLevel]
func_call 204 // func[GetControlTowerLevel]
handler 0 // NO_DESIRE
handler 1 // ATTACKED
handler 2 // SPELLED
handler 3 // TALKED
handler 4 // TALK_SELECTED
handler 5 // SEE_CREATURE
handler 10 // MY_DYING
handler 11 // TIMER_FIRED
handler 12 // TIMER_FIRED_EX
handler 13 // CREATED
handler 16 // SEE_SPELL
handler 17 // OUT_OF_TERRITORY
handler 18 // DESIRE_MANIPULATION
handler 19 // PARTY_ATTACKED
handler 21 // PARTY_DIED
handler 23 // CLAN_ATTACKED
handler 25 // STATIC_OBJECT_CLAN_ATTACKED
handler 28 // TELEPORT_REQUESTED
handler 31 // QUEST_ACCEPTED
handler 32 // MENU_SELECTED
handler 33 // LEARN_SKILL_REQUESTED
handler 34 // ONE_SKILL_SELECTED
handler 36 // CLASS_CHANGE_REQUESTED
handler 42 // CREATE_PLEDGE
handler 43 // DISMISS_PLEDGE
handler 44 // REVIVE_PLEDGE
handler 45 // LEVEL_UP_PLEDGE
handler 48 // CREATE_ALLIANCE
handler 49 // SCRIPT_EVENT
handler 50 // TUTORIAL_EVENT
handler 51 // QUESTION_MARK_CLICKED
handler 52 // USER_CONNECTED
handler 61 // MOVE_TO_WAY_POINT_FINISHED
handler 62 // USE_SKILL_FINISHED
handler 63 // MOVE_TO_FINISHED
Yes, yes, bla bla
but i need more details :'(
use ai.obj sources to code what u need and then changes handler and func_call to chinese ai.boj values.
I Need details about all the methods of ai.obj
sauron what do you mean?
i remember seeing some kind of more friendly version of ai.obj with if's and such things...but ow do you get that, decompiling the .obj?
someone can write some details about ai.obj
Its Huge!
yes I know but I need just some detail for ex. about how to add items in shop or add NPC or change monsters spawn location and somethings like that
Okay since no one else wants to give you info here you go... i'll walk you through AI editing.
Okay say you want a GM NPC one that sell GM armor if you ever make a set of it... anyway you're gonna open up your AI.obj, decide on an NPC's name to use for this example I will use denkus.
Now as you can see I have grabbed denkus' AI which is fine you can use any AI you like, anyway now we come down to the bottom of our AI.obj file and add the following.Code:class denkus : merchant
property_define_begin
buyselllist_begin SellList0
{908; 10 **
{909; 10 **
{910; 10 **
{911; 10 **
{912; 10 **
buyselllist_end
property_define_end
class_end
This is the AI for the gmnpc when we set denkus' AI to //setai gmnpcCode:class gmnpc : merchant
property_define_begin
buyselllist_begin SellList0
{908; 10 **
{909; 10 **
{910; 10 **
{911; 10 **
buyselllist_end
property_define_end
class_end
He now becomes your GM npc... I wouldn't do this around alot of people hehe... anyway to add items to what he sells you'll just add your item ID in between the two brackets {1; 10** this would mean he sells a small sword at 10% the tax rates, I hope this has helped you that is all you have to do to add items to what they're selling blah blah blah, as for the blacksmiths add it to multisell.txt, as you can tell there is something seriously wrong with ragezone adding ** for the right bracket but it is a bracket nothing more. As for changing monster spawns thats in the NPCpos.txt file.
Very nice !
but what about new mutisell list ?
for exampe
multisell.txt
Code:MultiSell_begin [coca_cola] 4
selllist={{{[elven_ring];2**;{{[coke];20******;
{{[elven_necklace];1**;{{[coke];20******;
{{[elven_earing];1**;{{[coke];15******;
{{[bow_of_forest];1**;{{[coke];20******;
{{[long_sword];1**;{{[coke];20******;
{{[relic_of_saints];1**;{{[coke];20******;
MultiSell_end
what about blacksmith html file ?
or other html file, like description of items ?
The only thing you need to edit the multisell for is the blacksmiths and the lux shop... you don't need to edit the htmls at all... as for adding stuff to the lux shop or blacksmiths thats pretty simple...
Code:MultiSell_begin [coca_cola] 4
selllist={{{[elven_ring];2**;{{[coke];20******;
{{[elven_necklace];1**;{{[coke];20******;
{{[elven_earing];1**;{{[coke];15******;
{{[bow_of_forest];1**;{{[coke];20******;
{{[long_sword];1**;{{[coke];20******;
{{[relic_of_saints];1**;{{[coke];20******;
{{[some_item_here];1****;{{[adena];10000********
MultiSell_end
You can always add stuff to the multisell as long as there is a ; instead of the right closing brace, once you include a right closing brace that is as far as the file is parsed... or something sorry bit tired to think right now lol...