|
You last visited: Today at 19:20
Advertisement
Please Help - How to add awake system like this /awake , /awa or /awakening!
Discussion on Please Help - How to add awake system like this /awake , /awa or /awakening! within the Flyff Private Server forum part of the Flyff category.
08/26/2015, 02:43
|
#1
|
elite*gold: 0
Join Date: Jul 2015
Posts: 170
Received Thanks: 10
|
Please Help - How to add awake system like this /awake , /awa or /awakening!
How to add awake system like this /awake , /awa or /awakening!
|
|
|
08/26/2015, 09:35
|
#2
|
elite*gold: 110
Join Date: Oct 2010
Posts: 306
Received Thanks: 58
|
Search for /gro in FuncTextCmd and Copy it or get the System out of another Source
yours truly,
- Kevin
|
|
|
08/28/2015, 12:15
|
#3
|
elite*gold: 0
Join Date: Jul 2015
Posts: 170
Received Thanks: 10
|
can you make a tut please
|
|
|
08/28/2015, 12:53
|
#4
|
elite*gold: 980
Join Date: Nov 2011
Posts: 4,747
Received Thanks: 771
|
Open your Source folder.
Go to Search - Search: "FuncTextCmd"
Search in that file: "gro", and add awake or awa to the synonyms, and the Auth down to the User-Level.
Rebuild and test it.
|
|
|
08/28/2015, 15:31
|
#5
|
elite*gold: 0
Join Date: Sep 2011
Posts: 677
Received Thanks: 390
|
Replace
Code:
BOOL TextCmd_GenRandomOption( CScanner & s )
in FuncTextCmd.cpp
by
Code:
BOOL TextCmd_GenRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
CItemElem* pItemElem = pUser->m_Inventory.GetAt(0);
#ifdef __AWA_WITH_PENYACOST
if (pItemElem)
{
int nCost = 10000;
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind(pItemElem);
if (0 < nCost)
{
if (nRandomOptionKind >= 0)
{
if (pUser->GetGold() > nCost)
{
if (pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET)
{
char chMessage[100];
sprintf(chMessage, "Du musst dein aktives Pet einpacken!");
pUser->AddText(chMessage);
}
else
{
pUser->AddGold(-(nCost));
g_xRandomOptionProperty->InitializeRandomOption(pItemElem->GetRandomOptItemIdPtr());
g_xRandomOptionProperty->GenRandomOption(pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts);
pUser->UpdateItemEx((BYTE)(pItemElem->m_dwObjId), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId());
}
}
else
{
pUser->AddText("Du hast nicht genug Geld!");
}
}
}
}
else
{
pUser->AddText("Lege den Gegenstand an den ersten Slot deines Inventars.");
}
#else
if (pItemElem)
{
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind(pItemElem);
if (nRandomOptionKind >= 0)
{
if (pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET)
{
char chMessage[100];
sprintf(chMessage, "Du musst dein aktives Pet einpacken!");
pUser->AddText(chMessage);
}
else
{
g_xRandomOptionProperty->InitializeRandomOption(pItemElem->GetRandomOptItemIdPtr());
g_xRandomOptionProperty->GenRandomOption(pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts);
pUser->UpdateItemEx((BYTE)(pItemElem->m_dwObjId), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId());
}
}
}
#endif //__AWA_WITH_PENYACOST
#endif // __WORLDSERVER
return TRUE;
}
And define in Versioncommon.h from WorldServer, Neuz and DatabaseServer
Code:
#define __AWA_WITH_PENYACOST
Edit 1:
Here you can set the price each awake:
Edit 2:
Search for:
Code:
ON_TEXTCMDFUNC( TextCmd_GenRandomOption
and change the last part to:
Code:
"awake", "awa", "°¢¼ºÃູ", "°¢Ãà", TCM_BOTH, AUTH_GENERAL, "" )
|
|
|
08/28/2015, 19:45
|
#6
|
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
|
cleaner
Code:
BOOL TextCmd_GenRandomOption(CScanner &s)
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
CItemElem* pItemElem = pUser->m_Inventory.GetAt(0);
if (pItemElem)
{
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind(pItemElem);
if (nRandomOptionKind >= 0)
{
#ifdef __AWA_WITH_PENYACOST
int nAwakeCost = 10000;
if (pUser->GetGold() < nAwakeCost)
{
pUser->AddText("Not enough Gold");
return false;
}
pUser->AddGold(-(nCost));
#endif
g_xRandomOptionProperty->InitializeRandomOption(pItemElem->GetRandomOptItemIdPtr());
g_xRandomOptionProperty->GenRandomOption(pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts);
pUser->UpdateItemEx((BYTE)(pItemElem->m_dwObjId), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId());
if (pUser->IsUsing(pItemElem) && (nRandomOptionKind == CRandomOptionProperty::eEatPet || nRandomOptionKind == CRandomOptionProperty::eSystemPet))
pUser->ResetDestParamRandomOptExtension(pItemElem);
}
}
#endif
return true;
}
Probably can make nAwakeCost static and const as well.
|
|
|
08/30/2015, 09:12
|
#7
|
elite*gold: 0
Join Date: Jul 2015
Posts: 170
Received Thanks: 10
|
Thanks to all
|
|
|
04/25/2017, 07:33
|
#8
|
elite*gold: 0
Join Date: Mar 2017
Posts: 342
Received Thanks: 18
|
got a problem here. penya cost doesn't exist no penya cost how to fix that ?
|
|
|
04/30/2017, 08:33
|
#9
|
elite*gold: 0
Join Date: Apr 2016
Posts: 59
Received Thanks: 5
|
Change nAwakeCost to nCost to remove error
|
|
|
|
Similar Threads
|
Hilfe Fix Awake System
10/26/2014 - Flyff Private Server - 4 Replies
Ich habe dieses System eingefügt. http://www.elitepvpers.com/forum/flyff-pserver-gui des-releases/3161647-release-fix-awake-scroll.html
Es traten keine Fehlermeldungen auf ingame kann ich die Scrolls auch erstellen.
Nun wenn ich doppelt raufklicke erscheint der "Hammer" nun klicke ich auf ein Item welches ich erwecken möchte. Es passiert aber nichts. Die Scroll bleibt im Inventar und das Item ist auch nicht erweckt. Wenn ich die Scroll angeklickt habe und zb. auf Food oder sowas klicke kommt...
|
[Frage] Transfer Awake System
07/05/2013 - Flyff Private Server - 9 Replies
Hat wer ein Transfer Awake System per scroll oder befehl :D?
wäre nett wenn einer eins posten würde
habe nur das von Jopsi gefunden weiß aber net ob/wie ich das zu einer scroll mache ;O
~push~
|
Awake Bot^^
08/25/2012 - Flyff - 11 Replies
Hallo leute,
Ich spiele sehr häufig FlyFF und jedesmal verschiedene Pservern zurzeit Insanity Flyff, das problem ist das ich jedesmal alles Erwecken muss ... ist ja auch normal NUR bei Pservern muss halt alles immer Perfekt sein >.<
Zur meiner Frage :
Gibt es einen Funktionierenden Awake Bot der automatisch die gewünschten Stats awaked und dann auch aufhört, wenn ja wäre es sehr hilfreich wenn einer den Bot mal Public machen würde ._.
Vielen dank
skayla ~
|
All times are GMT +2. The time now is 19:20.
|
|