FuckStyle
Mensagens : 23 Data de inscrição : 07/12/2011
| Assunto: Sistema De Buff Sex Dez 09, 2011 12:28 pm | |
| Coloque isso no final do seu Main.txt: - Código:
-
Sub Buff(index, stat, amount, duration) If GetVar("Buff.ini", GetPlayerName(index), CStr(stat)) = "" Then Select Case stat Case 0 Call SetPlayerStr(index, GetPlayerStr(index) + Int(Amount)) Case 1 Call SetPlayerDef(index, GetPlayerDef(index) + Int(Amount)) Case 2 Call SetPlayerMagi(index, GetPlayerMagi(index) + Int(Amount)) Case 3 Call SetPlayerSpeed(index, GetPlayerSpeed(index) + Int(Amount)) Case Else Exit Sub End Select Call SendStats(index) Call PutVar("Buff.ini", GetPlayerName(index), CStr(stat), Cstr(amount)) duration = duration * 1000 Call SetTimer("Debuff " & index & ", " & CStr(stat), duration) Call SendHP(index) Call SendMP(index) Call SendSP(index) End If End Sub Sub Debuff(index, stat) Amount = GetVar("Buff.ini", GetPlayerName(index), CStr(stat)) Select Case stat Case "0" Call SetPlayerStr(index, GetPlayerStr(index) - Int(Amount)) Case "1" Call SetPlayerDef(index, GetPlayerDef(index) - Int(Amount)) Case "2" Call SetPlayerMagi(index, GetPlayerMagi(index) - Int(Amount)) Case "3" Call SetPlayerSpeed(index, GetPlayerSpeed(index) - Int(Amount)) End Select Call SendStats(index) Call PutVar("Buff.ini", GetPlayerName(index), CStr(stat), "") Call RemoveTimer("Debuff " & index & ", " & CStr(stat)) Call SendHP(index) Call SendMP(index) Call SendSP(index) End Sub Depois coloque isso na Sub LeftGame: - Código:
-
If GetVar("Buff.ini", GetPlayerName(index), "0") <> "" Then Call Debuff(index, "0") End If If GetVar("Buff.ini", GetPlayerName(index), "1") <> "" Then Call Debuff(index, "1") End If If GetVar("Buff.ini", GetPlayerName(index), "2") <> "" Then Call Debuff(index, "2") End If If GetVar("Buff.ini", GetPlayerName(index), "3") <> "" Then Call Debuff(index, "3") End If Pronto! Sistema adicionado... Agora para lançar o buff, adicione a seguinte case na Sub ScriptedSpell: - Código:
-
Case X Call Buff(index, N° Stats, Quantidade, Duração) Exit Sub Legenda: - X = Número da case - N° Stats = É o número do stats (Logo abaixo estão os números). - Quantidade = Quantidade que será adicionada no stats selecionado. - Duração = Tempo em que o stats ficará buffado. PS: Duração é em SegundosNumeros de Stats: • 0 = STR • 1 = DEF • 2 = MAGI • 3 = SPEED Créditos: Ballie , FuckStyle | |
|