Auteur : John Howe
Bienvenue, Invité. Veuillez vous connecter ou vous inscrire.
2024-04-28, 20:52:27

Connexion avec identifiant, mot de passe et durée de la session
Rechercher:     avancée
* Accueil Aide Rechercher Calendrier Identifiez-vous Inscrivez-vous
Turambar  |  Zone Technique  |  Développement : Scripts faits ou en cours  |  Fil de discussion: (script)Lockpicking qui fonctionne
Pages: [1]   Bas de page
Imprimer
Auteur Fil de discussion: (script)Lockpicking qui fonctionne  (Lu 2370 fois)
0 Membres et 1 Invité sur ce fil de discussion.
Frunku
Joueur Vétéran
****
Hors ligne Hors ligne

Messages: 1075


tychohorn@hotmail.com
Voir le profil WWW Courriel
« le: 2003-12-13, 15:22:14 »

Trouvé sur scriptsharing.org

Joyeux petit script que j'ai traduit en francais. Ca permet de fabriquer des verrous avec tinkering et de les installer sur des portes ou contenant dont on détient la clé (quoi que il n'y a pas de clés sur trb, alors faudrait adapter). Il y a différents types de verrous et même un explosif.
(version 55i)
voici le readme( pas la flemme de traduire):

Ok, installing this script is very easy, you just have to change the type of the i_lockpick item
in sphereitemb4.scp for the type in the script (t_lockpickwarro), then add the types of lock you
want in sphereskills.scp, so that people can craft them, and then add the main script in your
scripts folder. That should do it, but there are a few things you might like to know.
First, all the predefined t_door_locked that are in the game will have by default the worst lock
(that is, MORE2H=0), so if u need some place not to be accesed by journeyman lockpickers, set it's
MORE2h to 3 or 4.
Second, this script hasn't been tested in a shard with people(I'm still looking for host Razz) so
if u find any bug please send me a mail.
Third and most important, have fun with the script and beware of the house stealers Sourit.
Ah, and also think that you might put any chest in a container, so it's timer won't activate,
so don't expect the explosive lockpick in chests (well I'm trying, maybe I'll find out how),
so if u were wondering why there's a check so that u can't set this type of lock to chests,
thats why.
Ramon





Et voici le script:
//Made by The_Blind_Sniper, bugs to ppocrack@hotmail.com
[TYPEDEF t_cosa_locked] //This thing doesn't work well as a predefined type, still...
ON=@DCLICK
IF !(<LINK.UID>)
SRC.NEWITEM i_key_copper
SRC.ACT.MORE=<UID>
SRC.ACT.CONT=<SRC.UID>
SRC.NEWITEM i_key_copper
SRC.ACT.MORE=<UID>
SRC.ACT.CONT=<UID>
LINK=<SRC.UID>
ELSEIF (<SRC.FINDTYPE.t_key.MORE>==<UID>)
OPEN
ELSE
SRC.SYSMESSAGE You haven't got the key of this chest!
ENDIF
RETURN 1

[TYPEDEF t_lockpickwarro]
ON=@DCLICK
IF (<TOPOBJ.UID>==<SRC.UID>)
IF !(<SRC.FINDID.I_memoria_lockpicking>)
TARGET What are you willing to unlock?
ELSE
SRC.SYSMESSAGE Tu est encore en train de manipuler le verrou!
ENDIF
ELSE
SRC.SYSMESSAGE Tu dois les avoir sur toi!
ENDIF
RETURN 1

ON=@TARGON_CHAR
SRC.SYSMESSAGE Ca n'a pas de verrou.
RETURN 1

ON=@TARGON_GROUND
SRC.SYSMESSAGE Ca n'a pas de verrou.
RETURN 1

ON=@TARGON_ITEM
IF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==0)  //The predefined door locked in UO
VAR.DIFICULTAD=50
VAR.TIPO=0
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==1)
VAR.DIFICULTAD=55
VAR.TIPO=1
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==2)
VAR.DIFICULTAD=60
VAR.TIPO=2
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==3)
VAR.DIFICULTAD=65
VAR.TIPO=3
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==4)
VAR.DIFICULTAD=70
VAR.TIPO=4
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==5) //For gm use only...
VAR.DIFICULTAD=100
VAR.TIPO=5
ELSEIF (<SRC.TARG.TYPE>==t_cosa_locked)
VAR.DIFICULTAD=65
VAR.TIPO=6
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==0) //The predefined container locked in UO
VAR.DIFICULTAD=50
VAR.TIPO=7
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==1)
VAR.DIFICULTAD=55
VAR.TIPO=8
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==2)
VAR.DIFICULTAD=60
VAR.TIPO=9
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==3)
VAR.DIFICULTAD=65
VAR.TIPO=10
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==4)
VAR.DIFICULTAD=70
VAR.TIPO=11
ELSEIF (<SRC.TARG.TYPE>==t_container_locked)&&(<SRC.TARG.MORE2H>==5) //For gm use only...
VAR.DIFICULTAD=100
VAR.TIPO=12
ELSEIF (<SRC.TARG.TYPE>==t_secure)
VAR.DIFICULTAD=70
VAR.TIPO=13
ELSEIF (<SRC.TARG.TYPE>==t_secure_f)
VAR.DIFICULTAD=70
VAR.TIPO=14
ELSEIF (<SRC.TARG.TYPE>==t_door_locked)&&(<SRC.TARG.MORE2H>==6)
VAR.DIFICULTAD=55
VAR.TIPO=15
ELSE
VAR.DIFICULTAD=0
ENDIF
IF !(<VAR.DIFICULTAD>==0)
   SRC.EMOTE essaye de deverouiller l'objet avec un crochet
   f_intenta_forzar <EVAL (<EVAL {0 10}>+<EVAL <SRC.LOCKPICKING>/100>)>
      SRC.NEWITEM i_memoria_lockpicking
      SRC.ACT.TIMER=<EVAL {1 2}>
      SRC.ACT.CONT=<SRC.UID>
      SRC.SFX 0242
      VAR.DIFICULTAD2=<EVAL <VAR.DIFICULTAD>+(-<EVAL {0 10}>)>
      SRC.SAY Difficulte du verrou: <EVAL <VAR.DIFICULTAD2>>!
   IF (<EVAL <VAR.FORZADURA>> >= <VAR.DIFICULTAD2>)
      IF (<VAR.TIPO> < 6)
      SRC.NEWITEM i_perateya
      SRC.ACT.P=<SRC.P>
      SRC.ACT.LINK=<SRC.TARG.UID>
      SRC.ACT.TIMER=(<SRC.LOCKPICKING>/10)*2
      SRC.ACT.MORE=<SRC.TAG.TIPO>
      SRC.TARG.TYPE=t_door
      SRC.TARG.MORE2h=0
      SRC.CONSUME 1 I_lockpick
      SRC.SYSMESSAGE Vous avez deverouille la porte!
      ELSEIF (<VAR.TIPO> < 6)&&(RAND(40)==0)
      SRC.TARG.TYPE=t_door
      SRC.TARG.MORE2h=0
      SRC.CONSUME 1 I_lockpick
      SRC.SYSMESSAGE Tu as deverouille la porte, mais tu as casse le verrou!
      ELSEIF (<VAR.TIPO>==15)   //This is an easy way to add custom locks
      SRC.TARG.TYPE=t_door //or let it t_door_locked(with the worst lock)???
      SRC.TARG.MORE2h=0
      SRC.CONSUME 1 I_lockpick
      SRC.SYSMESSAGE Vous avez deverouille la porte, mais active un piege.
      SRC.NEWITEM i_gold
      SRC.ACT.TYPE=T_explosion
      SRC.ACT.TIMERD=1
      SRC.ACT.SOUND=snd_SPELL_EXPLOSION
      SRC.ACT.LINK=<SRC.ACT.uid>
      SRC.ACT.P=<SRC.TARG.P>
      SRC.ACT.morex=120
      SRC.ACT.morez = 6
      SRC.ACT.morey=090
      ELSEIF (<VAR.TIPO> >= 6)&&(RAND(29)==0)
      SRC.TARG.TYPE=t_container
      SRC.CONSUME 1 I_lockpick
      SRC.TARG.MORE2h=0
      SRC.SYSMESSAGE Vous avez deverouille le coffre, mais vous avez casse le verrou.
      ELSE
      SRC.NEWITEM i_perateya
      SRC.ACT.P=<SRC.P>
      SRC.ACT.LINK=<SRC.TARG.UID>
      SRC.ACT.TIMER=(<SRC.LOCKPICKING>/10)*2
      SRC.ACT.MORE=<VAR.TIPO>
      SRC.TARG.TYPE=t_container
      SRC.CONSUME 1 I_lockpick
      SRC.TARG.MORE2h=0
      SRC.SYSMESSAGE You have unlocked the chest!
      ENDIF
      SRC.KILLS=<SRC.KILLS>+1
      f_sube_skill_lp
      RETURN 1
   ELSE
      IF (<SRC.LOCKPICKING> < 30.0)
         f_sube_skill_lp
      ENDIF
      SRC.CONSUME 1 I_lockpick
      SRC.SYSMESSAGE Vous n'avez pas deverouille l'objet.
      RETURN 1
   ENDIF
   SRC.KARMA=<SRC.KARMA>+(-200)      //Nota: es mu malo forzar cosas
ELSE
SRC.SYSMESSAGE Vous ne pouvez pas deverouiller ca.
ENDIF
RETURN 1

[ITEMDEF i_memoria_lockpicking]
ID=i_memory
NAME=Wait a little to lockpick again Razz
TYPE=t_eq_script

ON=@TIMER
REMOVE
RETURN 1


[ITEMDEF i_perateya]
ID=i_worldgem_bit
NAME=I put again the t_blabla_locked!
TYPE=t_script

ON=@CREATE
ATTR=attr_invis
COLOR=0245

ON=@TIMER
f_findtype
LINK.SAY *Le verrou se re-arme*
REMOVE
RETURN 1

[FUNCTION f_intenta_forzar]
DOSWITCH <ARGS>
VAR.FORZADURA=<EVAL {0 3}>   //No cuenta
VAR.FORZADURA=<EVAL {1 50}>
VAR.FORZADURA=<EVAL {2 51}>
VAR.FORZADURA=<EVAL {3 52}>
VAR.FORZADURA=<EVAL {4 53}>
VAR.FORZADURA=<EVAL {4 54}>
VAR.FORZADURA=<EVAL {4 55}>
VAR.FORZADURA=<EVAL {4 56}>
VAR.FORZADURA=<EVAL {4 57}>
VAR.FORZADURA=<EVAL {4 58}>
VAR.FORZADURA=<EVAL {5 59}>
VAR.FORZADURA=<EVAL {6 60}>
VAR.FORZADURA=<EVAL {7 61}>
VAR.FORZADURA=<EVAL {8 62}>
VAR.FORZADURA=<EVAL {9 63}>
VAR.FORZADURA=<EVAL {10 64}>
VAR.FORZADURA=<EVAL {15 65}>
VAR.FORZADURA=<EVAL {15 66}>
VAR.FORZADURA=<EVAL {15 67}>
VAR.FORZADURA=<EVAL {17 68}>
VAR.FORZADURA=<EVAL {19 70}>
VAR.FORZADURA=<EVAL {20 71}>
ENDDO
IF (<SRC.ISGM>)
VAR.FORZADURA=100
ENDIF
IF (0<SRC.TAG.DEBUG.COMBAT>)
SRC.SAY Mon essai: <EVAL <VAR.FORZADURA>>!
ENDIF

[FUNCTION f_findtype]
DOSWITCH <MORE>
LINK.TYPE=t_door_locked
LINK.TYPE=t_door_locked
LINK.TYPE=t_door_locked
LINK.TYPE=t_door_locked
LINK.TYPE=t_door_locked
LINK.TYPE=t_door_locked
LINK.TYPE=t_cosa_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_container_locked
LINK.TYPE=t_secure
LINK.TYPE=t_secure_f
LINK.TYPE=t_door_locked
ENDDO

[FUNCTION f_sube_skill_lp]
IF (<VAR.FORZADURA> >= RAND(100))&&(<SRC.LOCKPICKING> < 100.0)
   SRC.LOCKPICKING=<SRC.LOCKPICKING>+0.1

   IF (<VAR.FORZADURA> >= RAND(200))
      SRC.LOCKPICKING=<SRC.LOCKPICKING>+0.1
   ENDIF
ENDIF

[ITEMDEF i_lock_1]
ID=i_clock
NAME=Verrou faible
TYPE=t_lock
RESOURCES=15 i_ingot_iron
SKILLMAKE=55.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=0

[ITEMDEF i_lock_2]
ID=i_clock
NAME=Verrou novice
TYPE=t_lock
RESOURCES=17 i_ingot_iron
SKILLMAKE=65.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=1

[ITEMDEF i_lock_3]
ID=i_clock
NAME=Verrou difficile
TYPE=t_lock
RESOURCES=18 i_ingot_iron
SKILLMAKE=85.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=2

[ITEMDEF i_lock_4]
ID=i_clock
NAME=Verrou tres difficile
TYPE=t_lock
RESOURCES=19 i_ingot_iron
SKILLMAKE=85.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=3

[ITEMDEF i_lock_5]
ID=i_clock
NAME=Verrou TRES TRES difficile
TYPE=t_lock
RESOURCES=25 i_ingot_iron
SKILLMAKE=100.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=4

[ITEMDEF i_lock_6]
ID=i_clock
NAME=Verrou pour MJ
TYPE=t_lock

ON=@CREATE
color=0538
MORE=5

[ITEMDEF i_lock_Spec_1]         //An easy way to create new locks...
ID=i_clock
NAME=Verrou explosif
TYPE=t_lock
RESOURCES=25 i_ingot_iron,   3 i_potion_explosion
SKILLMAKE=100.0 TINKERING,t_tinker_Tools

ON=@CREATE
color=0538
MORE=6
MORE2=1    //Fonctionne seulement avec les portes.

[TYPEDEF t_lock]
ON=@DCLICK
TARGET Ou veux-tu placer un verrou??
RETURN 1

ON=@TARGOn_ITEM
   IF !(<SRC.TARG.MORE2H> >= <MORE>)
      IF (<SRC.FINDLAYER(21).FINDTYPE.T_KEY.MORE>==<SRC.TARG.MORE>)&&(<SRC.FINDLAYER(21).FINDTYPE.T_KEY.MORE>!=0)||(<SRC.ISGM>)
      IF (<MORE2>==0)||(<SRC.TARG.TYPE>==t_door)&&(<MORE2>==1)||(<SRC.TARG.TYPE>==t_door_locked)&&(<MORE2>==1)
      SRC.TARG.MORE2h=<MORE>
         IF (<SRC.TARG.TYPE>==t_door_locked)||(<SRC.TARG.TYPE>==t_door)
         SRC.TARG.TYPE=t_door_locked
         SRC.EMOTE Installe le verrou sur la porte.
         ELSEIF (<SRC.TARG.TYPE>==t_container_locked)||(<SRC.TARG.TYPE>==t_container)
         SRC.TARG.TYPE=t_container_locked
         SRC.EMOTE Installe le verrou sur le contenant.
         ELSE
         SRC.SYSMESSAGE Operation impossible.
         ENDIF
      CONSUME
      ELSE
      SRC.MESSAGE *Ce verrou s'installe seulement sur des portes*!
      ENDIF
      ELSE
      SRC.MESSAGE *Vous n'avez pas la cle pour ca!*!
      ENDIF
   ELSE
   SRC.MESSAGE *Cette porte a un verou egal ou meilleur a celui que vous tentez d'installer!*
   ENDIF
RETURN 1

ON=@TARGON_GROUND
SRC.SYSMESSAGE Tu ne peux pas faire ca!
RETURN 1

ON=@TARGON_CHAR
SRC.SYSMESSAGE Tu ne peux pas faire ca!
RETURN 1

[EOF]
Journalisée

-Frunku l'orque Le commando warg d'élite(menfin plus depuis les multi gm en skills de combat) de Saroumane. Forgeron(nul) à son compte.

(Plutôt en panne de Turambar en ce moment...)

Vous êtes temptés par les forces des ténèbres? Adhérez vite! Plus d'information sur http://www.thelandofshadow.com !
Moumix
Joueur Vétéran
****
Hors ligne Hors ligne

Sexe: Homme
Messages: 4480


52369290 moumix@hotmail.com
Voir le profil Courriel
« Répondre #1 le: 2003-12-14, 13:47:45 »

Tu peux plutôt m'envoyer le fichier .scp par mail?

Ca me tente de pas de faire un copier/coller foireux et de devoir remettre toutes les lignes dans leur bon état... (j'ai déjà donné pour ça et ça me tente plus, réellement)
Journalisée
Moumix
Joueur Vétéran
****
Hors ligne Hors ligne

Sexe: Homme
Messages: 4480


52369290 moumix@hotmail.com
Voir le profil Courriel
« Répondre #2 le: 2003-12-15, 00:24:31 »

Nan c bon je les ai

mais faudrait que tout le monde se mette dans le crâne de ne plus utiliser mon adresse hotmail...
je l'utilise exclusivement pour pouvoir lancer msn sans me prendre la tête à changer d'adresse dessus...
Journalisée
Pages: [1]   Haut de page
Imprimer
Turambar  |  Zone Technique  |  Développement : Scripts faits ou en cours  |  Fil de discussion: (script)Lockpicking qui fonctionne
Aller à:  

Propulsé par MySQL Propulsé par PHP Powered by SMF 1.1.8 | SMF © 2006-2009, Simple Machines LLC XHTML 1.0 Transitionnel valide ! CSS valide !