Jump to content

FlyFF Private Server SQL Tools


z0mgItsJohn
 Share

Recommended Posts

Here Are Some Functions I Made While Working With My Private Server.. I'm Also An Admin / Dev On Fly-For-Hero ^^

Big Thanks To CDKID For His SQL UDFs

Ull Need Those UDFs And The Driver For This To Work ^^

http://www.autoitscript.com/forum/index.ph...0814&hl=SQL

Helpful Functions :

Func _PlayerGet_Account ($Server, $Player)
Local $Char_Name = _GetColVals ($Server, 'Characters','Charname') 
Local $Account_Name = _GetColVals ($Server, 'Characters','Accountname')
Local $Account = ('-1'), $Total = ('-1')
If $Char_Name['0'] = $Account_Name['0'] Then $Total = $Char_Name['0']
If $Total = ('-1') Then Return ('-1')
If $Total <> ('-1') Then 
For $Array = '1' To $Total
If $Char_Name[$Array] = $Player Then $Account = $Account_Name[$Array]
Next
If $Account <> ('-1') Then Return ('Account Name : ' & $Account)
If $Account = ('-1') Then Return ('Error Player Dose Not Exist In Database')
EndIf  
EndFunc

Func _PlayerAdd_Penya ($Server, $Player, $Penya)
$Total_Penya = _PlayerGet_Penya ($Server, $Player) + $Penya
_Query ($Server, "UPDATE characters SET penya = '" & $Total_Penya & "' WHERE charname = '" & $Player & "'")
If Not @Error Then Return ('Success')
EndFunc

Func _PlayerGet_Level ($Server, $Player)
Local $Level = _GetColVals ($Server, 'Characters','Level')
Local $Char_Name = _GetColVals ($Server, 'Characters','Charname') 
For $Array = '1' To $Char_Name['0']
If $Char_Name[$Array] = $Player Then 
$Level = $Level[$Array]
Return $Level
EndIf 
Next
EndFunc

Func _PlayerGet_Penya ($Server, $Player)
Local $Penya = _GetColVals ($Server, 'Characters','Penya')
Local $Char_Name = _GetColVals ($Server, 'Characters','Charname') 
For $Array = '1' To $Char_Name['0']
If $Char_Name[$Array] = $Player Then 
$Penya = $Penya[$Array]
Return $Penya
EndIf 
Next
EndFunc

Func _PlayerStat_Reset ($Server, $Player)
_Query ($Server, "UPDATE characters SET stat_str = '15' WHERE charname = '" & $Player & "'")
_Query ($Server, "UPDATE characters SET stat_sta = '15' WHERE charname = '" & $Player & "'")
_Query ($Server, "UPDATE characters SET stat_dex = '15' WHERE charname = '" & $Player & "'")
_Query ($Server, "UPDATE characters SET stat_int = '15' WHERE charname = '" & $Player & "'")
$Total_Points = (_PlayerGet_Level ($Server, $Player) * '2') - '2'
_Query ($Server, "UPDATE characters SET statpoints = '" & $Total_Points & "' WHERE charname = '" & $Player & "'")
If Not @Error Then Return ('Success')
EndFunc

Func _PlayerSet_Level ($Server, $Player, $Level)
$Current_Level = _PlayerGet_Level ($Server, $Player)
_Query ($Server, "UPDATE characters SET level = '" & $Level & "' WHERE charname = '" & $Player & "'")
_PlayerStat_Reset ($Server, $Player)
If Not @Error Then Return ('Success')
EndFunc

Func _AccountSet_Access_Level ($Server, $Account, $Access_Level)
_Query ($Server, "UPDATE accounts SET accesslevel = '" & $Access_Level & "' WHERE username = '" & $Account & "'")
If Not @Error Then Return ('Success')
EndFunc

$Server Is The Connection OBJ.. P.S. Sorry I Can't Make The Functions Look Better But I'm In A Hurry ^^

Latest Projects :- New & Improved TCP Chat

Link to comment
Share on other sites

I don't see why this would be useful to the community o.O

And Why Are You Talking Like This ? I Hate To See People Talking Like This o.O

I hate people who belittle others based on speech. If the OP couldn't be understood that's one thing but this is legible. Also posting in threads just to boost your post count is pretty bad conduct. The past 3 topics I've seen you post in your posts had no real relevance. As for the tools I don't have a private server so I can't test them out. Including the necessary functions in your UDF may make things easier,so long as you credit the authors.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...