Script de Transformation abordée par Solcihiro
3 participants
Forum Collapse of Time MMORPG 2D Francophone Gratuit :: Communauté :: Programmation :: Forum d'apprentissage / Questions
Page 1 sur 1
Script de Transformation abordée par Solcihiro
Voila j'ai fait un script de transformation, mais celui-ci ne marche pas.
Je vous le montre ci-dessous:
Voila est je ne comprend pas qu'il ne marchent pas manquerait-il quelque chose?
Ou une chose en trop?
Aider moi (Je vous en supplie.)
Je vous le montre ci-dessous:
- Code:
Case "/SS1"
If GetPlayerClass(index) = 2 Then
If GetPlayerSprite(Index) = 12 Then
If GetPlayerLevel(index) => 100 then
Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50)
Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50)
Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50)
Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50)
Call SetPlayerClass(index, )
Call SetPlayerSprite(index, )
Call SendPlayerData(index)
Call PlayerMsg(Index, "Vous santez une energie grandir en vous!"1)
End If
End If
End If
Voila est je ne comprend pas qu'il ne marchent pas manquerait-il quelque chose?
Ou une chose en trop?
Aider moi (Je vous en supplie.)
Dernière édition par solichiro le Sam 20 Mar - 0:37, édité 1 fois
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
L'erreur est là ! Tu as laissé un blanc après les index, il faut renseigner la classe a mettre durant la transformation et puis le sprite a changer.Call SetPlayerClass(index, )
Call SetPlayerSprite(index, )
Re: Script de Transformation abordée par Solcihiro
A d'accords!
Alors enfaite, c'est cela!
Alors enfaite, c'est cela!
- Code:
Case "/SS1"
If GetPlayerClass(index) = 2 Then
If GetPlayerSprite(Index) = 12 Then
If GetPlayerLevel(index) => 100 then
Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50)
Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50)
Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50)
Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50)
Call SetPlayerClass(index,1 )
Call SetPlayerSprite(index,14 )
Call SendPlayerData(index)
Call PlayerMsg(Index, "Vous santez une energie grandir en vous!"1)
End If
End If
End If
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
attention aux espaces. (surtout pas d'espace à la fin)Call SetPlayerClass(index,1 )
Call SetPlayerSprite(index,14 )
cela doit être
Call SetPlayerClass(index,1)
Call SetPlayerSprite(index,14)
mais peut être aussi (pou aerer le script) ceci :
Call SetPlayerClass(index, 1)
Call SetPlayerSprite(index, 14)
C'est comme ça que je fais personnellement.
Re: Script de Transformation abordée par Solcihiro
Merci de tes réponse mais, mon problème principale, c'est que la transformation ne ce lance pas.
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Mon script de transformation ne marchent pas aider moi!
Sachant que la transformation c'est:
Sa ne marchent pas manquerait-il quelque chose ou quelque chose en trop?
- Code:
Sub Commands(index)
On Error Resume Next
Dim Portal
Dim mapnum
Dim x
Dim y
Dim i
Dim TextSay
Dim n
Dim m
Dim C
m = GetVar("Data.ini", "MAX", "MAX_MAPS")
TextSay = GetVar("scripts\Command.ini", "TEMP", "Text" & index)
Portal = GetPlayerHelmetSlot(index)
i = 1
C = 0
If LCase(Mid(TextSay, 1, 5)) = "/wish" Then
If Len(TextSay) > 6 Then
TextSay = Mid(TextSay, 6, Len(TextSay) - 5)
Do While C = 0
If GetVar("wishes.ini", "WISH", "Wish" & i) <> "" then
i = i + 1
Else
Call PutVar("wishes.ini", "WISH", "Wish" & i, Trim(TextSay))
Call PlayerMsg(index, "Merci d'avoir effectué un souhait!", 6)
C = 1
End if
Loop
End If
Exit Sub
End If
'##########BALISE TEXTSAY########
If LCase(Mid(TextSay, 1, 9)) = "/warpmeto" Then
If Len(TextSay) > 10 Then
TextSay = Mid(TextSay, 10, Len(TextSay) - 9)
' Prevent hacking
If GetPlayerAccess(index) < 2 And GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela!", 4)
Exit Sub
End If
' The player
n = FindPlayer(TextSay)
If n <> index Then
If n > 0 Then
Call PlayerWarp(index, GetPlayerMap(n), GetPlayerX(n), GetPlayerY(n))
Call PlayerMsg(n, GetPlayerName(index) & " a été téléporté sur toi.", 6)
Call PlayerMsg(index, "Vous avez été téléporté sur " & GetPlayerName(n) & ".", 6)
Call AddLog(GetPlayerName(index) & " s'est téléporté sur " & GetPlayerName(n) & ", map #" & GetPlayerMap(n) & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Joueur Hors ligne.", 15)
End If
Else
Call PlayerMsg(index, "Vous ne pouvez vous teleporter sur vous-meme!!", 15)
End If
End If
Exit Sub
End If
If LCase(Mid(TextSay, 1, 9)) = "/warptome" Then
If Len(TextSay) > 10 Then
If GetPlayerAccess(index) < 2 And GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela!", 4)
Exit Sub
End If
n = Mid(TextSay, 10, Len(TextSay) - 9)
n = FindPlayer(n)
If n <> index Then
If n > 0 Then
Call PlayerWarp(n, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))
Call PlayerMsg(n, "Tu as été téléporté sur " & GetPlayerName(index) & ".", 9)
Call PlayerMsg(index, GetPlayerName(n) & " a été téléporté.", 9)
Call AddLog(GetPlayerName(index) & " a téléporté " & GetPlayerName(n) & " sur lui, map #" & GetPlayerMap(index) & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Joueur Hors ligne.", 15)
End If
Else
Call PlayerMsg(index, "Tu ne peux t'auto teleporter!", 15)
End If
End If
Exit Sub
End If
If LCase(Mid(TextSay, 1, 7)) = "/warpto" Then
If Len(TextSay) > 8 Then
TextSay = Mid(TextSay, 8, Len(TextSay) - 7)
n = TextSay
If n > 0 And n <= m Then
If GetPlayerAccess(index) < 2 And GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela", 4)
Exit Sub
End If
Call PlayerWarp(index, n, GetPlayerX(index), GetPlayerY(index))
Call PlayerMsg(index, "vous avez été téléporté map #" & n, 9)
Call AddLog(GetPlayerName(index) & " a été télporté en map #" & n & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Mauvais numero de map.", 4)
End If
End If
Exit Sub
End If
If LCase(Trim(TextSay)) = "/help" Then
Call PlayerMsg(index, "Commandes:", 15)
Call PlayerMsg(index, "'messageici = Broadcast Message", 15)
Call PlayerMsg(index, "-messageici = Emote Message", 15)
Call PlayerMsg(index, "*messageici = message de guilde", 15)
Call PlayerMsg(index, "+messageici = message d'union", 15)
Call PlayerMsg(index, "!nom messageici = Message a un joueur", 15)
Call PlayerMsg(index, "Commandes diponibles: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", 15)
Exit Sub
End If
If LCase(Trim(TextSay)) = "/calladmins" Then
If GetPlayerAccess(index) = 0 Then
Call GlobalMsg(GetPlayerName(index) & " a besoin d'un administrateur!", 10)
Else
Call PlayerMsg(index, "Tu es un admin!", 10)
End If
Exit Sub
End If
If LCase(Trim(TextSay)) = "/admin" Then
If GetPlayerAccess(index) > 0 Then
Call PlayerMsg(index, "Commandes:", 15)
Call PlayerMsg(index, """messageici = Global Admin Message", 15)
Call PlayerMsg(index, "=messageici = Private Admin Message", 15)
Call PlayerMsg(index, "COmmandes disponibles: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", 15)
End If
Exit Sub
End If
Select Case LCase(Trim(TextSay))
'##########BALISE LCASE########
Case "/SS1"
If GetPlayerClass(index) = 1 Then
If GetPlayerSprite(Index) = 12 Then
If GetPlayerLevel(index) => 100 then
Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50)
Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50)
Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50)
Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50)
Call SetPlayerSprite(index,13)
Call SendPlayerData(index)
Call PlayerMsg(Index, "Vous sentez une énergie grandir en vous!", 1)
End If
End If
End If
Case "/away"
'If GetPlayerAccess(index) >= 1 Then
If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
Call GlobalMsg(GetPlayerName(index) & " est absent.", 14)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " - Abs")
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " est de retour.", 14)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If
'End If
Case "/mdr"
Call PlayerMsg(Index,"MDR", 15)
End Select
End Sub
Sachant que la transformation c'est:
- Code:
Case "/SS1"
If GetPlayerClass(index) = 1 Then
If GetPlayerSprite(Index) = 12 Then
If GetPlayerLevel(index) => 100 then
Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50)
Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50)
Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 50)
Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 50)
Call SetPlayerSprite(index,13)
Call SendPlayerData(index)
Call PlayerMsg(Index, "Vous sentez une énergie grandir en vous!", 1)
End If
End If
End If
Sa ne marchent pas manquerait-il quelque chose ou quelque chose en trop?
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Tu as mis deux fois "End if" :/ J'y connais pas grand chose en VB6 je ne peut pas trop d'aider !
wipe- Soldat Infecté
- Messages : 155
Réputation : 15
Date d'inscription : 01/12/2009
Age : 29
Localisation : Montpellier, devant son PC
Re: Script de Transformation abordée par Solcihiro
D'accord j'essaye sa tout de suite!
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
J'arrive pas a trouver l'erreur.
Sachant que ce n'est pas un plantage du script donc au niveau des end if et tout c'est bon.
Lorsqu'il tape /SS1 ca fait commande invalide.
Sachant que ce n'est pas un plantage du script donc au niveau des end if et tout c'est bon.
Lorsqu'il tape /SS1 ca fait commande invalide.
Re: Script de Transformation abordée par Solcihiro
Hum... Dur dur, il me refait la même chose que avent il marque rien!
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Désoler double post
J'aurer besoin d'une multitude de changement silvouplait .
Genre time, script etc...
J'aurer besoin d'une multitude de changement silvouplait .
Genre time, script etc...
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
J'ai pas compris, une multitude de changements?
Ou plusieurs effets durant la transformation? (temps entre chaque étape de la transformation, effets sonores, changement des stats)
PS: 3000eme message
Ou plusieurs effets durant la transformation? (temps entre chaque étape de la transformation, effets sonores, changement des stats)
PS: 3000eme message
Re: Script de Transformation abordée par Solcihiro
Oui les sons le temps etc..
Ps: Félicitation 3001me message ^^
Ps: Félicitation 3001me message ^^
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
La fonction qui fait appele aux sons est la suivante :
Call PlaySound("nom_du_son.wav")
(Les sons en questions doivent être dans le dossier SFX)
Sinon pour faire attendre entre chaque ligne de script, utilises :
Call Patienter(nombre_de_secondes)
(Ex : Call Patienter(5))
Call PlaySound("nom_du_son.wav")
(Les sons en questions doivent être dans le dossier SFX)
Sinon pour faire attendre entre chaque ligne de script, utilises :
Call Patienter(nombre_de_secondes)
(Ex : Call Patienter(5))
Re: Script de Transformation abordée par Solcihiro
Ok, sa ce n'est pas un problème, mon problème c'est que la transformation ne ce lance pas pourrait tu a nouveaux corriger mes dossier?
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Et voila je t'as fais un fichier Commandes.txt tout neuf avec la commande /SS1 dedans Ca fonctionne c'est 100% sûr :
Et j'affiche a nouveau le script pour la commande SS1 que j'ai commenté.
Il te restes juste à remplacer les X. Je t'ais tout livré sur un plateau d'argent là ^^
Si ca bug c'est que l'erreur ne vient pas du commandes.txt
Bon courage
Merci qui ?
- Code:
Sub Commands(index)
On Error Resume Next
Dim Portal
Dim mapnum
Dim x
Dim y
Dim i
Dim TextSay
Dim n
Dim m
Dim C
m = GetVar("Data.ini", "MAX", "MAX_MAPS")
TextSay = GetVar("scripts\Command.ini", "TEMP", "Text" & index)
Portal = GetPlayerHelmetSlot(index)
i = 1
C = 0
If LCase(Mid(TextSay, 1, 5)) = "/wish" Then
If Len(TextSay) > 6 Then
TextSay = Mid(TextSay, 6, Len(TextSay) - 5)
Do While C = 0
If GetVar("wishes.ini", "WISH", "Wish" & i) <> "" then
i = i + 1
Else
Call PutVar("wishes.ini", "WISH", "Wish" & i, Trim(TextSay))
Call PlayerMsg(index, "Merci d'avoir effectué un souhait!", 6)
C = 1
End if
Loop
End If
Exit Sub
End If
'##########BALISE TEXTSAY########
If LCase(Mid(TextSay, 1, 5)) = "/bugs" Then
If Len(TextSay) > 6 Then
TextSay = Mid(TextSay, 6, Len(TextSay) - 5)
Do While C = 0
If GetVar("BUGS.ini", "BUGS", "Bugnumero" & i) <> "" then
i = i + 1
Else
Call PutVar("BUGS.ini", "BUGS", "Bugnumero" & i, Trim(GetPlayerName(index) & " rapporte le bug suivant:" & TextSay))
Call PlayerMsg(index, "Merci d'avoir rapporté au staff le bug!", 6)
C = 1
End if
Loop
End If
Exit Sub
End If
If LCase(Mid(TextSay, 1, 9)) = "/warpmeto" Then
If Len(TextSay) > 10 Then
TextSay = Mid(TextSay, 10, Len(TextSay) - 9)
' Prevent hacking
If GetPlayerAccess(index) < 2 OR GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela!", 4)
Exit Sub
End If
' The player
n = FindPlayer(TextSay)
If n <> index Then
If n > 0 Then
Call PlayerWarp(index, GetPlayerMap(n), GetPlayerX(n), GetPlayerY(n))
Call PlayerMsg(n, GetPlayerName(index) & " a été téléporté sur toi.", 6)
Call PlayerMsg(index, "Vous avez été téléporté sur " & GetPlayerName(n) & ".", 6)
Call AddLog(GetPlayerName(index) & " s'est téléporté sur " & GetPlayerName(n) & ", map #" & GetPlayerMap(n) & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Joueur Hors ligne.", 15)
End If
Else
Call PlayerMsg(index, "Vous ne pouvez vous teleporter sur vous-meme!!", 15)
End If
End If
Exit Sub
End If
If LCase(Mid(TextSay, 1, 9)) = "/warptome" Then
If Len(TextSay) > 10 Then
If GetPlayerAccess(index) < 2 OR GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela!", 4)
Exit Sub
End If
n = Mid(TextSay, 10, Len(TextSay) - 9)
n = FindPlayer(n)
If n <> index Then
If n > 0 Then
Call PlayerWarp(n, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index))
Call PlayerMsg(n, "Tu as été téléporté sur " & GetPlayerName(index) & ".", 9)
Call PlayerMsg(index, GetPlayerName(n) & " a été téléporté.", 9)
Call AddLog(GetPlayerName(index) & " a téléporté " & GetPlayerName(n) & " sur lui, map #" & GetPlayerMap(index) & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Joueur Hors ligne.", 15)
End If
Else
Call PlayerMsg(index, "Tu ne peux t'auto teleporter!", 15)
End If
End If
Exit Sub
End If
If LCase(Mid(TextSay, 1, 7)) = "/warpto" Then
If Len(TextSay) > 8 Then
TextSay = Mid(TextSay, 8, Len(TextSay) - 7)
n = TextSay
If n > 0 And n <= m Then
If GetPlayerAccess(index) < 2 OR GetPlayerAccess(Index) > 4 Then
Call PlayerMsg(index, "Tu dois etre plus élevé en grade pour faire cela", 4)
Exit Sub
End If
Call PlayerWarp(index, n, GetPlayerX(index), GetPlayerY(index))
Call PlayerMsg(index, "vous avez été téléporté map #" & n, 9)
Call AddLog(GetPlayerName(index) & " a été télporté en map #" & n & ".", ADMIN_LOG)
Else
Call PlayerMsg(index, "Mauvais numero de map.", 4)
End If
End If
Exit Sub
End If
If LCase(Trim(TextSay)) = "/calladmins" Then
If GetPlayerAccess(index) = 0 Then
Call GlobalMsg(GetPlayerName(index) & " a besoin d'un administrateur!", 10)
Else
Call PlayerMsg(index, "Tu es un admin!", 10)
End If
Exit Sub
End If
If LCase(Trim(TextSay)) = "/admin" Then
If GetPlayerAccess(index) > 0 Then
Call PlayerMsg(index, "Commandes:", 15)
Call PlayerMsg(index, """messageici = Global Admin Message", 15)
Call PlayerMsg(index, "=messageici = Private Admin Message", 15)
Call PlayerMsg(index, "COmmandes disponibles: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", 15)
End If
Exit Sub
End If
'##############################
Select Case LCase(Trim(TextSay))
'##########BALISE LCASE########
Case "/away"
If GetPlayerAccess(index) >= 0 Then
'Call PlayerMsg(Index, "Commande désactivée. Causes : Abus.", 7)
If GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 0 Then
Call GlobalMsg(GetPlayerName(index) & " est absent.", 14)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 1)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName", GetPlayerName(index))
Call SetPlayerName(index, GetPlayerName(index) & " - Abs")
Call SendPlayerData(index)
Exit Sub
ElseIf GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status") = 1 Then
Call SetPlayerName(index, GetVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "TempPlayerName"))
Call GlobalMsg(GetPlayerName(index) & " est de retour.", 14)
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Status", 0)
Call SendPlayerData(index)
Exit Sub
End If
End If
Else
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "Groupe", GetPlayerName(index))
Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini", "CHAR" & GetPlayerCharNum(index), "GpMbr1", GetPlayerName(index))
Call PlayerMsg(index, "groupe créer", 14)
End If
case "/save"
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "exp" , getplayerexp(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "class" , getplayerclass(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "sprite" , getplayersprite(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "armorslot" , getplayerarmorslot(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "weaponslot" , getplayerweaponslot(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "helmetslot" , getplayerhelmetslot(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "shieldslot" , getplayershieldslot(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "level" , getplayerlevel(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "hp" , getplayerhp(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "mp" , getplayermp(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "sp" , getplayersp(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "str" , getplayerstr(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "def" , getplayerdef(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "speed" , getplayerspeed(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "magi" , getplayermagi(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "points" , getplayerpoints(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "map" , getplayermap(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "x" , getplayerx(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "y" , getplayery(index))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 1, getplayerinvitemnum(index, 1))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 1, getplayerinvitemvalue(index, 1))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 1, getplayerinvitemdur(index, 1))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 2, getplayerinvitemnum(index, 2))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 2, getplayerinvitemvalue(index, 2))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 2, getplayerinvitemdur(index, 2))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 3, getplayerinvitemnum(index, 3))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 3, getplayerinvitemvalue(index, 3))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 3, getplayerinvitemdur(index, 3))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 4, getplayerinvitemnum(index, 4))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 4, getplayerinvitemvalue(index, 4))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 4, getplayerinvitemdur(index, 4))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 5, getplayerinvitemnum(index, 5))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 5, getplayerinvitemvalue(index, 5))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 5, getplayerinvitemdur(index, 5))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 6, getplayerinvitemnum(index, 6))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 6, getplayerinvitemvalue(index, 6))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 6, getplayerinvitemdur(index, 6))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 7, getplayerinvitemnum(index, 7))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 7, getplayerinvitemvalue(index, 7))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 7, getplayerinvitemdur(index, 7))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 8, getplayerinvitemnum(index, 8))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 8, getplayerinvitemvalue(index, 8))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 8, getplayerinvitemdur(index, 8))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 9, getplayerinvitemnum(index, 9))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 9, getplayerinvitemvalue(index, 9))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 9, getplayerinvitemdur(index, 9))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 10, getplayerinvitemnum(index, 10))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 10, getplayerinvitemvalue(index, 10))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 10, getplayerinvitemdur(index, 10))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 11, getplayerinvitemnum(index, 11))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 11, getplayerinvitemvalue(index, 11))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 11, getplayerinvitemdur(index, 11))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 12, getplayerinvitemnum(index, 12))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 12, getplayerinvitemvalue(index, 12))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 12, getplayerinvitemdur(index, 12))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 13, getplayerinvitemnum(index, 13))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 13, getplayerinvitemvalue(index, 13))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 13, getplayerinvitemdur(index, 13))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 14, getplayerinvitemnum(index, 14))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 14, getplayerinvitemvalue(index, 14))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 14, getplayerinvitemdur(index, 14))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 15, getplayerinvitemnum(index, 15))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 15, getplayerinvitemvalue(index, 15))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 15, getplayerinvitemdur(index, 15))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 16, getplayerinvitemnum(index, 16))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 16, getplayerinvitemvalue(index, 16))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 16, getplayerinvitemdur(index, 16))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 17, getplayerinvitemnum(index, 17))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 17, getplayerinvitemvalue(index, 17))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 17, getplayerinvitemdur(index, 17))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 18, getplayerinvitemnum(index, 18))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 18, getplayerinvitemvalue(index, 18))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 18, getplayerinvitemdur(index, 18))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 19, getplayerinvitemnum(index, 19))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 19, getplayerinvitemvalue(index, 19))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 19, getplayerinvitemdur(index, 19))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 20, getplayerinvitemnum(index, 20))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 20, getplayerinvitemvalue(index, 20))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 20, getplayerinvitemdur(index, 20))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 21, getplayerinvitemnum(index, 21))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 21, getplayerinvitemvalue(index, 21))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 21, getplayerinvitemdur(index, 21))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 22, getplayerinvitemnum(index, 22))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 22, getplayerinvitemvalue(index, 22))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 22, getplayerinvitemdur(index, 22))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 23, getplayerinvitemnum(index, 23))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 23, getplayerinvitemvalue(index, 23))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 23, getplayerinvitemdur(index, 23))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemnum" & 24, getplayerinvitemnum(index, 24))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemval" & 24, getplayerinvitemvalue(index, 24))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "invitemdur" & 24, getplayerinvitemdur(index, 24))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 1, getplayerspell(index, 1))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 2, getplayerspell(index, 2))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 3, getplayerspell(index, 3))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 4, getplayerspell(index, 4))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 5, getplayerspell(index, 5))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 6, getplayerspell(index, 6))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 7, getplayerspell(index, 7))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 8, getplayerspell(index, 8))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 9, getplayerspell(index, 9))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 10, getplayerspell(index, 10))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 11, getplayerspell(index, 11))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 12, getplayerspell(index, 12))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 13, getplayerspell(index, 13))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 14, getplayerspell(index, 14))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 15, getplayerspell(index, 15))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 16, getplayerspell(index, 16))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 17, getplayerspell(index, 17))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 18, getplayerspell(index, 18))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 19, getplayerspell(index, 19))
call putvar("accounts\" & getplayerlogin(index) & ".ini ", "char" & getplayercharnum(index), "spell" & 20, getplayerspell(index, 20))
call putvar("accounts\" & getplayerlogin(index) & ".ini " , "char" & getplayercharnum(index) , "guild" , getplayerguild(index))
call playermsg(index, "Sauvegarde effectuée!", 2)
case "/SS1"
If GetPlayerClass(Index) = X Then 'Si la classe du joueur est X alrs.
If GetPlayerSprite(Index) = X Then 'Si le numero du sprite du joueur est X alrs.
Call PlaySound(index, "nom_fichier.wav") 'joue un son du dossier SFX
Call SetPlayerSTR(index, GetPlayerSTR(index)+50) 'modifie la force
Call SetPlayerDEF(index, GetPlayerDEF(index)+50) 'idem defense
Call SetPlayerSPEED(index, GetPlayerSPEED(index)+50) 'idem vitesse
Call SetPlayerMAGI(index, GetPlayerMAGI(index)+50) 'idem magie
Call SetPlayerSprite(index, X) 'on defini le sprite de la premiere etape de la transformation
Call SendPlayerData(index) 'on refraichi l'image pour voir le changement immediatement
Call Patienter(1)'on attend une seconde
Call SetPlayerSprite(index, X) 'et rebelotte pour la 2eme etape
Call SendPlayerData(index)
Call Patienter(1)
Call SetPlayerSprite(index, X)' 3eme etape
Call SendPlayerData(index)
Call Patienter(1)
Call SetPlayerSprite(index, X)' 4eme etape (ajoutez ou enlevez le nombre d'étapes à votre guise
Call SendPlayerData(index)
Call Patienter(1)
End If
End If 'c'est fini ;)
case "/mdr"
Call PlayerMsg(Index, "MDR!", 15)
End Select
End Sub
Et j'affiche a nouveau le script pour la commande SS1 que j'ai commenté.
- Code:
case "/SS1"
If GetPlayerClass(Index) = X Then 'Si la classe du joueur est X alrs.
If GetPlayerSprite(Index) = X Then 'Si le numero du sprite du joueur est X alrs.
Call PlaySound(index, "nom_fichier.wav") 'joue un son du dossier SFX
Call SetPlayerSTR(index, GetPlayerSTR(index)+50) 'modifie la force
Call SetPlayerDEF(index, GetPlayerDEF(index)+50) 'idem defense
Call SetPlayerSPEED(index, GetPlayerSPEED(index)+50) 'idem vitesse
Call SetPlayerMAGI(index, GetPlayerMAGI(index)+50) 'idem magie
Call SetPlayerSprite(index, X) 'on defini le sprite de la premiere etape de la transformation
Call SendPlayerData(index) 'on refraichi l'image pour voir le changement immediatement
Call Patienter(1)'on attend une seconde
Call SetPlayerSprite(index, X) 'et rebelotte pour la 2eme etape
Call SendPlayerData(index)
Call Patienter(1)
Call SetPlayerSprite(index, X)' 3eme etape
Call SendPlayerData(index)
Call Patienter(1)
Call SetPlayerSprite(index, X)' 4eme etape (ajoutez ou enlevez le nombre d'étapes à votre guise
Call SendPlayerData(index)
Call Patienter(1)
End If
End If 'c'est fini ;)
Il te restes juste à remplacer les X. Je t'ais tout livré sur un plateau d'argent là ^^
Si ca bug c'est que l'erreur ne vient pas du commandes.txt
Bon courage
Merci qui ?
Re: Script de Transformation abordée par Solcihiro
J'essaye tout de suite je t'aime!
Merci Deus! (Dieux)
Merci Deus! (Dieux)
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Désoler double post
Je les laisse les truck que ta rajouter (idem pour la defence)
(c'est fini) etc???
Je les laisse les truck que ta rajouter (idem pour la defence)
(c'est fini) etc???
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Oui ce sont des commentaires et n'affectent pas le script ^^
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Sa ne marchent toujours pas Connecte toi sur Msn please je suis désespérer!
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Bon bas j'abandonne idée des script...
je croie que c'est moi qui ne fait pas bien la chose...
je croie que c'est moi qui ne fait pas bien la chose...
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Re: Script de Transformation abordée par Solcihiro
Pourtant je t'ais dis comment procéder.
Le remplacement du dossier script et tout ça.
Faut te dire que la moindre erreur fait tout planter, moi j'ai plus de 6000 lignes de scripts annexes dans le dossier script et pas une erreur, donc tu vois c'est largement faisable un script de 20 lignes ^^
Faut trouver la source de l'erreur qui manifestement n'est pas dans le commandes.txt
Va dans tous les fichiers ou tu as modifier un truc, je pense à ton script de mort par exemple et trouve les erreurs.
Le remplacement du dossier script et tout ça.
Faut te dire que la moindre erreur fait tout planter, moi j'ai plus de 6000 lignes de scripts annexes dans le dossier script et pas une erreur, donc tu vois c'est largement faisable un script de 20 lignes ^^
Faut trouver la source de l'erreur qui manifestement n'est pas dans le commandes.txt
Va dans tous les fichiers ou tu as modifier un truc, je pense à ton script de mort par exemple et trouve les erreurs.
Re: Script de Transformation abordée par Solcihiro
Houai tu a raison... Merci du conseille, mais je suis désespérer.
solichiro- Metroirus
- Messages : 17
Réputation : 1
Date d'inscription : 20/03/2010
Sujets similaires
» Apprendre le Script : If / Then / Else
» Apprendre le Script : Les Variables.
» Juste pour info au niveau du script
» Apprendre le script lettre par lettre
» Apprendre le Script : Les Variables.
» Juste pour info au niveau du script
» Apprendre le script lettre par lettre
Forum Collapse of Time MMORPG 2D Francophone Gratuit :: Communauté :: Programmation :: Forum d'apprentissage / Questions
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum