![]() |
|
|
#1 |
|
Архивный участник
Join Date: Nov 2006
Posts: 75
|
Hi
Please could you share a npc buffer for c4 server ? Thx loots |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Nov 2006
Posts: 204
|
check the clanhall manager and you should get a good idea of how they work
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Nov 2006
Posts: 75
|
I have see and my npc buffer not work can you take my your npc buffer please ?
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Is more easy than the clan hall buffer, look at santa helper code... is ready to use... you can easy mod that to code without know a lot about AI, only add a new buffs or modify the way you select the buffs (with ask and reply parameters)... or.. i dont know... there are a lot of posible modifications.
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Nov 2006
Posts: 75
|
can you share a npc buffer worker please ??
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Dec 2006
Posts: 21
|
deleted !! Fidow THE BEST !!!
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Thats the fucking code i posted the other day and today i delete because.. no one reply, no one thanks... and like i see... some people leech it in silence.
Now i have a better one, with some extra checks, a delay between buffs... you can set an item for the buff... exactly this code... but this time ... not compiled code... only NASC, do it by yourself Code:
class buffer_npc : default_npc {
parameter:
string fnHi = "buffer_npc001.htm";
string fnYouAreChaotic = "buffer_npc002.htm";
string fnNotEnoughAdena = "buffer_npc003.htm";
string fnWait = "buffer_npc004.htm";
int ItemBuff = 57;
int Amount = 1000;
int Delay = 500;
handler:
EventHandler CREATED() {
myself.i_ai0 = 0;
}
EventHandler TALKED(talker) {
if (talker.karma > 0) myself->ShowPage(talker,fnYouAreChaotic);
else myself->ShowPage(talker,fnHi);
}
EventHandler MENU_SELECTED(talker,ask,reply) {
if ( (ask == 1) && (myself->OwnItemCount(talker,ItemBuff) >= Amount) ) {
if( myself.i_ai0 == 0 ) {
myself.i_ai0 = 1;
myself->DeleteItem1(talker,ItemBuff,Amount);
myself->AddUseSkillDesire(talker,reply,1,1,1000000);
myself->ShowPage(talker,fnHi);
myself->AddTimerEx(1,Delay);
}
else myself->ShowPage(talker,fnWait);
}
else myself->ShowPage(talker,fnNotEnoughAdena);
}
EventHandler TIMER_FIRED_EX(timer_id) {
if( timer_id == 1 ) myself.i_ai0 = 0;
}
}
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Dec 2006
Posts: 27
|
I have one question
myself->AddUseSkillDesire(talker,reply,1,1,1000000); What means 3 last parameters |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
This is from C1 NPC Server, but most of them must be identical
Code:
//Functions CreatePet (CSharedCreatureData* to, int nPetCollarClassID, int nPetNpcClassID) DeleteRadar (CSharedCreatureData* to, int x, int y, int z) ShowRadar (CSharedCreatureData* to, int x, int y, int z) EnableTutorialEvent (CSharedCreatureData* to, int EventSet) CloseTutorialHTML (CSharedCreatureData* to) ShowQuestionMark2 (CSharedCreatureData* to, int id, int sec) ShowQuestionMark (CSharedCreatureData* to, int id) ShowTutorialHTML2 (CSharedCreatureData* to, WCHAR* HTMLFileName, int nSec, WCHAR* SoundFile) ShowTutorialHTML (CSharedCreatureData* to, WCHar* HTMLFileName) StrToInt (WCHAR *sTarget) SubStr (WCHAR *sTarget, int nIndex, int nLen) PledgeName (int nPledgeIndex) PledgeLevelUp (int pledge_id) DistFromTo (CSharedCreatureData* from, CSharedCreatureData* to) InstantTeleportInMyTerritory (int x, int y, int z, int range) InMyTerritory (CSharedCreatureData* c) EnableMakingSeeEvent () Despawn () SoundEffect (CSharedCreatureData* c, WCHAR *SoundFile) SetWeightPoint (CSharedCreatureData* c, int nWeightPoint) IncrementParam (CSharedCreatureData* c, int nType, float value) CreateOnePrivateEx () Maker_FindNpcByKey (int key) Maker_GetNpcCount () EnableTimeEvent (int time) CreateOnePrivate (int private_class_id, const WCHAR* pszAI, int private_weight_point) CreatePrivates (WCHAR* privates) UseCategoryItem (int nCateoryID) UseItem (int nItemNameID) UseCategorySkill (CSharedCreatureData* c, int nCategoryID) UseSkill (CSharedCreatureData* c, int nSkillNameID) Skill_GetAttribute (int nSkillNameID) Skill_GetEffectPoint (int nSkillNameID) Skill_GetConsumeMP (int nSkillNameID) Skill_GetConsumeHP (int nSkillNameID) Skill_GetTargetType (int nSkillNameID) Castle_PostCropPurchase (CSharedCreatureData* c, int itemID, int count) Castle_DeleteCropDrop (int itemID) Castle_SetCropDrop (int itemID, int delta, int price, int level) Castle_SetCropPrice (int itemID, int price) Castle_GetTaxIncome () Castle_GetCropIncome () Castle_GetCropPrice (int itemID) Castle_GetCropRate (int itemID) ClassChange (CSharedCreatureData* c, int nOccupationClassID) IsInCategory (int class_id, int category_id) SkillQuest_GetQuestMessage (SkillQuestList *SkillQuest, int SkillNameID) SkillQuest_GetQuestItemID (SkillQuestList *SkillQuest, int SkillNameID) SkillQuest_GetQuestID (SkillQuestList *SkillQuest, int SkillNameID) ShowQuestSuggestion (CSharedCreatureData* c, int skill_name_id, int quest_id, int quest_message) GetRedirectMessage (RedirectList* redirect, int skill_name_id) IsRedirect (RedirectList* redirect, int skill_name_id) ShowRedirectMessage (CSharedCreatureData *c, int nMessage) ShowGrowSkillMessage2 (CSharedCreatureData *c, int nSkillNameID, int nQuestID, int nQuestItemID, WCHAR* fnAfterGrow) ShowGrowSkillMessage (CSharedCreatureData *c, int nSkillNameID, WCHAR* fnAfterGrow) ShowSkillList (CSharedCreatureData *c, WCHAR *fnByePage) ShowChoicePage (CSharedCreatureData* to) AddChoice (int code, WCHAR* msg) Agit_SetMaster (CSharedCreatureData* to) Castle_GetPledgeId () Castle_GateOpenClose2 (WCHAR *sDoorName, int openclose) Castle_IsUnderSiege2 (int nResidenceId) Castle_GetRawSystemTime () Castle_GetRawSiegeTime () Castle_SetMPRegen (int nMpRegen) Castle_SetHPRegen (int nHpRegen) Castle_BanishOthers () Castle_GetMPRegen () Castle_GetHPRegen () Castle_IsUnderSiege () Castle_GetPledgeState (CSharedCreatureData* pc) Castle_GateOpenClose (int openclose) Castle_SetSiegeTime (int sat_sun, int before_after_noon, int hour, int min) Castle_IsGateOpen () Castle_SetTaxRate (int tax) Castle_GetTaxRate () Castle_GetSiegeTime () Castle_GetOwnerName () Castle_GetPledgeName () IsMyLord (CSharedCreatureData* talker) CheckSiege (CSharedCreatureData* talker) ApproveBattle (CSharedCreatureData* talker, WCHAR* fnHi) ViewSiegeList (CSharedCreatureData* talker, WCHAR* fnHi) PrepareSiegeTime (int sat_sun, int before_after_noon, int hour, int min) ShowSetSiegeTime //NO DATA RegisterSiegeDefender (CSharedCreatureData *talker) RegisterSiege (CSharedCreatureData *talker) GetPledgeSkillLevel (CSharedCreatureData *talker) MakeFString (int index, const WCHAR* s1, const WCHAR* s2, const WCHAR* s3, const WCHAR* s4,const WCHAR* s5) ShowFHTML (CSharedCreatureData* talker, CFHTML *pFHTML) FHTML_SetStr (CFHTML *pFHTML, WCHAR *pszVarName, WCHAR *pszStrData) FHTML_SetFloat (CFHTML *pFHTML, WCHAR *pszVarName, float dFloatData) FHTML_SetInt (CFHTML *pFHTML, WCHAR *pszVarName, int nIntData) FHTML_SetFileName (CFHTML *pFHTML, WCHAR *pszFileName) GetLastAttacker () AtomicDelete3Give1Item //NO DATA OwnItemCount (CSharedCreatureData* c, int nItemClassID) DeleteItem1 (CSharedCreatureData* c, int nItemClassID1, int nCount1) GiveItem3 (CSharedCreatureData* c, int nItemClassID1, int nCount1, int nItemClassID2, int nCount2, int nItemClassID3, int nCount3) GiveItem2 (CSharedCreatureData* c, int nItemClassID1, int nCount1, int nItemClassID2, int nCount2) GiveItem1 (CSharedCreatureData* c, int nItemClassID1, int nCount1) SetOneTimeQuestFlag (CSharedCreatureData* c, int nQuestID, int bSW) GetOneTimeQuestFlag (CSharedCreatureData* c, int nQuestID) AttachJournalToMemo (CSharedCreatureData* c, int nQuestID, int nDestID) RemoveMemo (CSharedCreatureData* c, int nQuestID) GetMemoState (CSharedCreatureData* c, int nQuestID) SetMemoState (CSharedCreatureData* c, int nQuestID, int nState) SetMemo (CSharedCreatureData* c, int nQuestID) HaveMemo (CSharedCreatureData* c, int nQuestID) GetMemoCount (CSharedCreatureData* c) FloatToInt (float f) IntToStr (int i) Rand (int n) GetWayPointDelay () SetTimerPeriod (int nSec) SetTimerPeriodByTick (int nTick) DistFromMe (CSharedCreatureData* c) HPRatio (CSharedCreatureData* c) IsAlive (CSharedCreatureData* c) Sell (CSharedCreatureData* talker, BuySellList* buySellList, WCHAR* shopname, WCHAR* sellPage, WCHAR* underAdenaPage, WCHAR* fnUnableItemSell) InstantTeleport (CSharedCreatureData* c, int x, int y, int z) Teleport (CSharedCreatureData* talker, TelPosList* telposlist, WCHAR* shopname, WCHAR* byePage, WCHAR* clsMissMatchPage, WCHAR* underAdenaPage) ShowPage (CSharedCreatureData* to, WCHAR* file) Shout (WCHAR *script) Talk (CSharedCreatureData* target, WCHAR *script) EquipItem //NO DATA SayFloat //NO DATA SayInt //NO DATA IsSpoiled () GetCreatureFromIndex (int index) GetIndexFromCreature (CSharedCreature* spCreature) AddTimerEx (int id, int msec) GetCurrentTick () IsSameString (WCHAR *s1, WCHAR *s2) GetLifeTime () GetTopDesireValue () MakeAttackEvent (CSharedCreatureData* attacker, int damage) RandomizeAttackDesire () RemoveAttackDesire (CSharedCreatureData*) RemoveAllAttackDesire () AddPetDefaultDesire_Follow (float value) AddEffectActionDesire (CSharedCreatureData *target, int method, float value) AddMoveToDesire (int x, int y, int z, float value) AddUseSkillDesire (CSharedCreatureData *target, int nSkillNameID, int skill_type, int action_move_type, float value) AddMoveToWayPointDesire (WayPointsType* pWayPoints, WayPointDelaysType* pWayPointDelays, int way_point, float value) AddDecayingDesire (float value) AddFollowDesire (CSharedCreatureData *commander, float value) AddFleeDesire (CSharedCreatureData *from, float value) AddChaseDesire (CSharedCreatureData *target, float value) AddGetItemDesire (CSharedItemData* item, float value) AddAttackDesire (CSharedCreatureData *target, int amt, float value) AddDoNothingDesire (int time, float value) AddMoveAroundDesire (int time, float value) //Events SAME_BLOODPLEDGE SAME_PARTY FRIEND MS_SILENCE MSTATE_BERSERK MSTATE_NORMAL PSTATE_PET_DEFAULT PSTATE_EFFECT_ACTION PSTATE_MOVE_TO PSTATE_USE_SKILL PSTATE_MOVE_TO_WAY_POINT PSTATE_DECAYING PSTATE_FOLLOW PSTATE_GET_ITEM PSTATE_FLEE PSTATE_CHASE PSTATE_ATTACK PSTATE_DO_NOTHING PSTATE_MOVE_AROUND PSTATE_IDLE MOVE_TO_INTERRUPTED USE_SKILL_INTERRUPTED MOVE_TO_WAY_POINT_INTERRUPTED FOLLOW_INTERRUPTED DECAYING_INTERRUPTED GET_ITEM_INTERRUPTED FLEE_INTERRUPTED CHASE_INTERRUPTED ATTACK_INTERRUPTED MOVE_AROUND_INTERRUPTED IDLE_INTRRUPTED MOVE_TO_FINISHED USE_SKILL_FINISHED MOVE_TO_WAY_POINT_FINISHED FOLLOW_FINISHED DECAYING_FINISHED GET_ITEM_FINISHED FLEE_FINISHED CHASE_FINISHED ATTACK_FINISHED MOVE_AROUND_FINISHED IDLE_FINISHED USER_CONNECTED QUESTION_MARK_CLICKED TUTORIAL_EVENT CREATE_ALLIANCE MANAGE_CASTLE_SIEGE ATTACKED_BY_PLEDGE LEVEL_UP_PLEDGE REVIVE_PLEDGE DISMISS_PLEDGE CREATE_PLEDGE GOD_BUY_GOODS GOD_SELL_GOODS GOD_SHOUT CMD_ATTACK CMD_FOLLOW_ME CLASS_CHANGE_REQUESTED SKILL_QUEST_ACCEPTED ONE_SKILL_SELECTED LEARN_SKILL_REQUESTED QUEST_ACCEPTED SELL_REQUESTED BUY_REQUESTED TELEPORT_REQUESTED HOLYTHING_SPELLED CLAN_SPELLED CLAN_ATTACKED FRIEND_ATTACKED PARTY_DIED PARTY_SPELLED PARTY_ATTACKED DESIRE_MANIPULATION OUT_OF_TERRITORY SEE_SPELL SEE_ATTACK TIME CREATED TIMER_FIRED_EX TIMER_FIRED MY_DYING MASTER_ATTACK DISAPPEAR_ITEM SEE_ITEM DISAPPEAR_CREATURE SEE_CREATURE TALK_SELECTED TALKED SPELLED ATTACKED NO_DESIRE //Vars question_id event_id time next_way_point_index way_point_index friend _friend private _private occupation_name_id skill_name_id need_quest _from_choice _choiceN _code timer_id skill_id reply quest_id item desire pledge_index success weapon_class_id state script creature speller target commander damage victim attacker talker myself //Talker Vars param3 param2 param1 dualgara2 dualgara1 meal quest_last_reward_time equiped_weapon_class_id residence_id attack_type flag target_index clan_help_range last_blow_weapon_class_id karma race respawn_time weight_point class_id boss_id sp occupation pledge_id is_pledge_master name max_hp alive level |
|
|
|
|
#10 |
|
Архивный участник
Join Date: Dec 2006
Posts: 27
|
big thx=))))))
|
|
|
|
|
#11 |
|
Архивный участник
Join Date: Dec 2006
Posts: 21
|
I am grateful to you for your knowledge, I have completed html code.. Thanks you big, I is simple noob in this business!! I now am borrowed such and it is necessary to me, I would be grateful if you have given completely the worker
|
|
|
|
|
#12 |
|
Архивный участник
Join Date: May 2006
Posts: 237
|
not sure if im doin it right but when i tried to compile yoru code i got this error any ideas ?
Code:
ERROR(67) : syntax error Fail to compile, total error count = 1 |
|
|
|
|
#13 |
|
Архивный участник
Join Date: Dec 2005
Posts: 242
|
FidoW will be great if you add the autor of that u posted.. later the leechers are the other ppl.
Original Code: https://postpacific.loc-online.com/f...ead.php?t=4086 |
|
|
|
|
#14 |
|
Архивный участник
Join Date: Jun 2005
Posts: 374
|
Did the C4-NASC ever get out? Or is there a modded version for C4 out there?
|
|
|
|
|
#15 | ||
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Quote:
Quote:
I don't think so, i did it by hand. |
||
|
|
|
|
#16 |
|
Архивный участник
Join Date: Dec 2006
Posts: 21
|
FidoW you'r THE BEST !! I LOVE YOU (:
|
|
|
|
|
#17 |
|
Архивный участник
Join Date: May 2006
Posts: 237
|
ahh no wonder thanks for the reply
|
|
|
|
|
#18 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
where i found the compiler , what's name .
I not understand all , i speack english bad thx you ^^ |
|
|
|
|
#19 |
|
Архивный участник
Join Date: Dec 2005
Posts: 242
|
|
|
|
|
|
#20 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
ok thx i will try.
|
|
|
|
|
#21 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
have you a link for download ? i not found .
|
|
|
|
|
#22 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
|
|
|
|
|
#23 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
xD sorry i speack very bad english
so can you explain why i can't open the file "npcgrp" with L2 fileedit ? The program said me file "not found" so what i see the file ? |
|
|
|
|
#24 |
|
Архивный участник
Join Date: Dec 2006
Posts: 207
|
hehe iy's good now but i see again a rabit so what i have wright all
npcname-e.dat: 14003 Buffer NPC 9C E8 A9 -1 npcgrp.dat: 14003 LineageNPC.a_buffer_npc_MHuman LineageNPCs.a_buffer_npc_MHuman_m00 2 LineageNPCsTex.a_buffer_npc_MHuman_m00_t00_b00 LineageNPCsTex.a_buffer_npc_MHuman_m00_t00_b01 0 1 0 1.20000005 0 3 ItemSound.fist_1 ItemSound.fist_2 ItemSound.fist_3 5 ItemSound.armor_underwear_1 ItemSound.armor_underwear_2 ItemSound.armor_underwear_3 ItemSound.armor_leather_1 ItemSound.armor_leather_3 3 ChrSound.MNpc_Old_Dmg_2 ChrSound.MNpc_Fighter_Dmg_2 ChrSound.MNpc_Fighter_Dmg_3 1 1 13 76 80 LineageEffect.p_u002_a 0 xx.xx000000 2xx.xx000000 xx.xx000000 1 0 |
|
|
|
|