|
You last visited: Today at 10:38
Advertisement
Tutorial : DoAddBuff function upgrade
Discussion on Tutorial : DoAddBuff function upgrade within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.
04/01/2017, 15:27
|
#1
|
elite*gold: 0
Join Date: Feb 2017
Posts: 49
Received Thanks: 33
|
Tutorial : DoAddBuff function upgrade
Hi, this tutorial aims to modify the DoAddBuff function in order to be able to choose the buff time. So, just copy and past the snippet in Ctrl.cpp/Ctrl.h
Code:
#ifdef __DO_ADD_BUFF
void CCtrl::DoAddBuff( DWORD dwSkill, int nLevel, int nTime, CCtrl *pTarget )
{
if( pTarget )
{
ItemProp* pSkillProp;
AddSkillProp* pAddSkillProp;
GetSkillProp( &pSkillProp, &pAddSkillProp, dwSkill, nLevel, "DoActiveSkill" );
if( pAddSkillProp )
{
DWORD dwSkillTime2 = pAddSkillProp->dwSkillTime;
if( nTime && nTime > 0 )
{
nTime *= 1000;
pAddSkillProp->dwSkillTime = nTime;
}
DoApplySkill( pTarget, pSkillProp, pAddSkillProp, 0, 0, FALSE, 0 );
#ifdef __WORLDSERVER
g_UserMng.AddDoApplySkill( this, pTarget->GetId(), dwSkill, nLevel );
#endif // __WORLDSERVER
pAddSkillProp->dwSkillTime = dwSkillTime2;
}
}
}
#endif // __DO_ADD_BUFF
Code:
#ifdef __DO_ADD_BUFF
void DoAddBuff( DWORD dwSkill, int nLevel, int nTime, CCtrl *pTarget );
#endif // __DO_ADD_BUFF
Format example :
Code:
pUserTarget->DoAddBuff( SI_ASS_CHEER_CANNONBALL, 20, 3600, pUserTarget );
|
|
|
04/01/2017, 16:10
|
#2
|
elite*gold: 115
Join Date: Jan 2012
Posts: 1,156
Received Thanks: 894
|
Makesure pTarget must not be NULL  include target check to avoid server crash
|
|
|
04/01/2017, 17:11
|
#3
|
elite*gold: 18
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
|
Quote:
Originally Posted by Rhyder`
Makesure pTarget must not be NULL  include target check to avoid server crash 
|
First line in function: if (pTarget)
Also checking for nTime && nTime > 0 is the same.
|
|
|
04/01/2017, 17:58
|
#4
|
elite*gold: 0
Join Date: Feb 2017
Posts: 49
Received Thanks: 33
|
Quote:
Originally Posted by Sedrika
First line in function: if (pTarget)
Also checking for nTime && nTime > 0 is the same.
|
Time > 0 => if you put 0, the buff time depend your INT
|
|
|
04/01/2017, 18:49
|
#5
|
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
|
Nobody noticing the obvious bug?
You modify your resource props, but never reset the value to the original one.
So either copy the original value into a temporal variable and modify the temporary variable, or reset the modified resource to the original one.
|
|
|
04/04/2017, 05:04
|
#6
|
elite*gold: 32
Join Date: Dec 2015
Posts: 2,275
Received Thanks: 1,113
|
if( nTime && nTime > 0 )
If nTime higher than 0 then its always true (if(ntime)). Why you double check it lol
its like
if( variable && variable => 1 && isset(variable) && variable == true)
looooooooooooooooooooooooooooooooooooooooooooooooo ooooooool
|
|
|
04/04/2017, 11:03
|
#7
|
elite*gold: 0
Join Date: Feb 2017
Posts: 49
Received Thanks: 33
|
Quote:
Originally Posted by FlyffServices
if( nTime && nTime > 0 )
If nTime higher than 0 then its always true (if(ntime)). Why you double check it lol
its like
if( variable && variable => 1 && isset(variable) && variable == true)
looooooooooooooooooooooooooooooooooooooooooooooooo ooooooool
|
Thank's Sedrika's parrot
|
|
|
 |
Similar Threads
|
[Tutorial] Call a function inside Neuz (melee attack example)
10/11/2022 - Flyff Hacks, Bots, Cheats, Exploits & Macros - 78 Replies
Hello sexy cheaters :D
I decided to make a little “tutorial” to explain you how to do some hacks like greyb1t’s last hack for Insanity which can be found here: http://www.elitepvpers.com/forum/flyff-hacks-bots- cheats-exploits-macros/4227051-greyb1ts-insanity-f lyff-super-killer.html
1. Introduction :cool:
The first thing i want to say, I am not a teacher as I am not enough skilled in coding and I usually do not produce proper code. But I will try to comment my code so you can understand...
|
[Tutorial] Basic Reversing in S4L (KickVote Function)
04/13/2015 - S4 League Hacks, Bots, Cheats & Exploits - 13 Replies
Hello. :)
Wanna show you how to reverse functions in S4 League.
So let's get started;
First you need the address of the pre-kickvote processing function,
which is located in some class(__thiscall). I found out that it's not a vtable entry, so that's not so good because with vftables you can always grab your functions easier.
http://i.imgur.com/8x9rO2q.png
.text:00E5FB12 push eax
|
[COBot]Tutorial with Inject DLL - Jump Function
03/02/2011 - Conquer Online 2 - 0 Replies
Hello guys,
i have a really old tutorial here about how to make a simple prog.
to make the character jump using DLL inject + delphi with source
and a .doc...
i don't remember from who is that to post the credits....
but i would love if someone could give a help here,
this tutorial is soo old, sometimes im lost in the addrs,
but found jump function or where i think it started...
|
[tutorial]Injection & Function Hooking
11/06/2010 - Tutorials - 5 Replies
First let me say this: This is not written by me, i found it posted on game deception a while ago and just rediscoverd it on my hd. Thought it might be interesting for some ppl here.
Credits go to whoever originally wrote it.
This contains a demo project for vc 2003 and a tutorial.
You can find the tutorial in the readme folder!!!!!!
oh, if you don't trust me, don't download it....
|
All times are GMT +1. The time now is 10:38.
|
|