Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 09.12.2006, 14:42   #1
didu
Архивный участник
 
Join Date: Nov 2006
Posts: 75
Default [Request share] Npc Buffer

Hi

Please could you share a npc buffer for c4 server ?

Thx loots
didu is offline  
Old 09.12.2006, 15:15   #2
dirkr
Архивный участник
 
Join Date: Nov 2006
Posts: 204
Default

check the clanhall manager and you should get a good idea of how they work
dirkr is offline  
Old 09.12.2006, 15:36   #3
didu
Архивный участник
 
Join Date: Nov 2006
Posts: 75
Default

I have see and my npc buffer not work can you take my your npc buffer please ?
didu is offline  
Old 09.12.2006, 17:07   #4
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

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.
FidoW is offline  
Old 09.12.2006, 17:29   #5
didu
Архивный участник
 
Join Date: Nov 2006
Posts: 75
Default

can you share a npc buffer worker please ??
didu is offline  
Old 11.12.2006, 20:35   #6
invisible13
Архивный участник
 
Join Date: Dec 2006
Posts: 21
Default

deleted !! Fidow THE BEST !!!
invisible13 is offline  
Old 11.12.2006, 23:24   #7
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

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;
  }

}
FidoW is offline  
Old 12.12.2006, 08:47   #8
SnowDragon
Архивный участник
 
Join Date: Dec 2006
Posts: 27
Default

I have one question
myself->AddUseSkillDesire(talker,reply,1,1,1000000);
What means 3 last parameters
SnowDragon is offline  
Old 12.12.2006, 14:15   #9
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

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
FidoW is offline  
Old 12.12.2006, 14:38   #10
SnowDragon
Архивный участник
 
Join Date: Dec 2006
Posts: 27
Default

big thx=))))))
SnowDragon is offline  
Old 12.12.2006, 17:55   #11
invisible13
Архивный участник
 
Join Date: Dec 2006
Posts: 21
Default

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
invisible13 is offline  
Old 13.12.2006, 01:11   #12
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

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
nish is offline  
Old 13.12.2006, 06:34   #13
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

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
RipperX is offline  
Old 13.12.2006, 07:15   #14
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

Did the C4-NASC ever get out? Or is there a modded version for C4 out there?
Aikeleer is offline  
Old 13.12.2006, 07:21   #15
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by RipperX View Post
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
Sorry RipperX, i have that in a text file in the recibed files folder of messenger since 3 or 4 months ago because someone send to me...

Quote:
Originally Posted by nish View Post
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
You can't compile that with C1 NASC but trying deleting the myself-> thing, thats the most important different, but the code obtained with C1 compiler isnt compaible with the C4 one but maybe you can adapt it easily, bu t i prefer learn to code by the beggining.


Quote:
Originally Posted by Aikeleer View Post
Did the C4-NASC ever get out? Or is there a modded version for C4 out there?
I don't think so, i did it by hand.
FidoW is offline  
Old 13.12.2006, 08:15   #16
invisible13
Архивный участник
 
Join Date: Dec 2006
Posts: 21
Default

FidoW you'r THE BEST !! I LOVE YOU (:
invisible13 is offline  
Old 13.12.2006, 19:59   #17
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

ahh no wonder thanks for the reply
nish is offline  
Old 15.12.2006, 03:00   #18
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

where i found the compiler , what's name .

I not understand all , i speack english bad

thx you ^^
Genes2 is offline  
Old 15.12.2006, 03:05   #19
RipperX
Архивный участник
 
Join Date: Dec 2005
Posts: 242
Default

Quote:
Originally Posted by Genes2 View Post
where i found the compiler , what's name .

I not understand all , i speack english bad

thx you ^^
C4 Compiler, uhm I don't think that anyone here have it.. but, maybe someone can do a NASC Extender for compile C4 ^^
RipperX is offline  
Old 15.12.2006, 03:07   #20
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

ok thx i will try.
Genes2 is offline  
Old 15.12.2006, 03:16   #21
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

have you a link for download ? i not found .
Genes2 is offline  
Old 15.12.2006, 07:44   #22
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by Genes2 View Post
have you a link for download ? i not found .
You dont found it because decompiler doesnt exits, please, buy a dictionary... people answer to you like 3 times not exists and you say "THX, I WILL TRY IT" and ... again you ask the same.
FidoW is offline  
Old 15.12.2006, 08:48   #23
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

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 ?
Genes2 is offline  
Old 15.12.2006, 10:40   #24
Genes2
Архивный участник
 
Join Date: Dec 2006
Posts: 207
Default

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
Genes2 is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:36.