z0mgItsJohn Posted November 8, 2008 Posted November 8, 2008 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 UDFsUll Need Those UDFs And The Driver For This To Work ^^http://www.autoitscript.com/forum/index.ph...0814&hl=SQLHelpful Functions :expandcollapse popupFunc _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
Innovative Posted November 9, 2008 Posted November 9, 2008 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
dbzfanatic Posted November 9, 2008 Posted November 9, 2008 I don't see why this would be useful to the community o.OAnd Why Are You Talking Like This ? I Hate To See People Talking Like This o.OI 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. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now