je ne sais absolument pas si je suis au bon endroit.
C'est pas vraiment un mod que je veux développer mais bon.
En gros, je suis occupé à modifier un script eseries pour inclure une petite routine, qui, traduite en français, donne:
"si le joueur appuie K et que j'ai des baies, je mange mes baies jusqu'à être guéri totalement".
Je l'ai créé dans un script etest.bs. Tout fonctionne : quand je le mets comme script du personnage, j'appuie K et le personnage me dit (comme prévu): "j'ai des baies dans ma poche. Tu as l'oeil, cher joueur
"miam - c'est bon. Joueur, pense à manger
miam - c'est vraiment bon. Joueur, va boire un coup.
miam - aaah ça fait du bien d'être seul sans joueur pour vous donenr des ordres
miam - tiens, déjà de retour?"
puis à la fin
"je suis guéri! merci joueur de prendre soin de moi!"
(Je vous ai romancé la chose).
donc, mon mini script fonctionne
Je mets le code en spoil
► Afficher le texte
Code : Tout sélectionner
// ***********************************
// soin avec les baies jusqu'à guérison complète
// ***********************************
IF
HotKey(K) // and I hit the K key
HPPercentLT(Myself,100) // and i have lost some hitpoints
OR(8)
HasItem("GBERRY7",Myself) // and I have a goodberry in my bag
HasItem("GBERRY6",Myself) // and I have a goodberry in my bag
HasItem("GBERRY5",Myself) // and I have a goodberry in my bag
HasItem("GBERRY4",Myself) // and I have a goodberry in my bag
HasItem("GBERRY3",Myself) // and I have a goodberry in my bag
HasItem("GBERRY2",Myself) // and I have a goodberry in my bag
HasItem("GBERRY1",Myself) // and I have a goodberry in my bag
HasItem("GBERRY",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
SetGlobal("gh_soin_par_baie","LOCALS",1) // set the global, gh_soin_par_baie to 1
DisplayStringHead(Myself,417) // say "j'ai des baies dnas ma poche"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY7",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY7",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY6",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY6",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY5",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY5",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY4",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY4",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY3",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY3",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY2",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY2",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY1",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY1",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
ActionListEmpty()
CombatCounter(0) // if combat is over
HPPercentLT(Myself,100) // and i have lost some hitpoints
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
HasItem("GBERRY",Myself) // and I have a goodberry in my bag
THEN
RESPONSE #100
UseItem("GBERRY",Myself)
DisplayStringHead(Myself,12106) // say "Good Berries"
END
IF
HPPercentGT(Myself,99) // If i'm full hp
Global("gh_soin_par_baie","LOCALS",1) // and i have asked for being healed by goodberries
THEN
RESPONSE #100
SetGlobal("gh_soin_par_baie","LOCALS",0) // set the global "gh_soin_par_baie" to 0 because i don't need anymore healing by eatings goodberries.
DisplayStringHead(Myself,14022) // say "Good Berries"
END
Je le colle à la toute fin du fichier.(en vérité des 6 fichiers de scripts), après la routine d'attaque normale. Bref, après ça:
Code : Tout sélectionner
// * MINIMUM ATTACK
IF
ActionListEmpty()
See(NearestEnemyOf(Myself)) // but we can still see AN enemy
!InParty(LastSeenBy(Myself)) // and they're not in our party (double-check)
!Allegiance(LastSeenBy(Myself),GOODCUTOFF) // and not an Ally, Familiar, Minion or Simulacrum
THEN
RESPONSE #100
AttackOneRound(NearestEnemyOf(Myself)) // and attack
ENDJe redémarre BG2.
Je clique sur K cette fois (en fait, je reprends toujours une sauvegarde où le personnage blessé a genre 100 baies sur lui
Et....... rien ne se passe.
La petite ligne "tiens j'ai des baies dans ma poche", sensée m'indiquer que le personnage a lancé la routine de manger les baies ne s'affiche pas.
Je ne comprends pas.
Quelqu'un peut il m'aider?
Sith