Titre: En attendant de refaire fishing... Posté par: epphyx le 2004-08-26, 21:31:51 J'ai ce petit script tout gentil pour les pecheurs (mais risqué quand meme)
qui leur permet de gagner avec la canne a peche un bonus (tant qu'ils l'ont équipée) de 10 % (c'est enorme et surement trop) mais qui peut leur attiré des ennuis (enfin sauf si on voit les PG alignés au bord du lac a taquiner le goujon 8) ) PS ca a été fait pour du 55 ou la fonction iswater marchait pas. je sais pas si en 99 on peut faire plus simple.... Citation /////////////////////////////////////////////// ////// La canne a peche merveilleuse ////////// /////////////////////////////////////////////// ///////////// par epphyx ////////////////////// /////////////////////////////////////////////// [itemdef i_capm] name=canne a peche a moulinet //NOM DE L'ITEM id=i_fishing_pole //ID INTERNE ULTERIEURE type=T_FISH_POLE // AFFECTATION DU SKIN ET DES PROPRIETES VALUE=100 // valeur pour l'item id weight=2 // poids de l'objet category=Items by Professions // pour axis SUBSECTION=pecheur // pour axis DESCRIPTION=canne a peche a moulinet // pour axis RESOURCES=1 i_log, 1 i_nails, 1 i_thread, 1 i_gears SKILLMAKE=CARPENTRY 70.1, TAILORING 40.1, tinkering 45.1, t_carpentry ,i_sewing_kit, t_tinker_tools //competences et items necessaire pour la fabrication On=@create color=color_cyan ON=@equip src.fishing=<src.fishing>+10.0 on=@unequip src.fishing=<src.fishing>+(-10.0) on=@dclick target on=@targon_ground src.home=<src.p> src.p=<src.targp> if (<SRC.isonwater>) src.p=<src.home> if (<eval rand(100)>=0) src.say humm ca a l'air d'un gros src.newnpc c_m_kraken // un simple serpent de mer serait mieux mais j'avais pas sous la main endif else src.p=<src.home> endif src.p=<src.home> //retour maison //merci a Swindler auteur de la fontion ISONWATER qui suit [FUNCTION isonwater] VAR.ISONWATER 0 SRC.NEWNPC c_dummy_dolphin SRC.ACT.P <SRC.P> SRC.ACT.HOME <SRC.P> VAR.PX <SRC.ACT.P.X> VAR.PY <SRC.ACT.P.Y> SRC.ACT.dolphin_run nw SRC.ACT.dolphin_run n SRC.ACT.dolphin_run ne SRC.ACT.dolphin_run e SRC.ACT.dolphin_run se SRC.ACT.dolphin_run s SRC.ACT.dolphin_run sw SRC.ACT.dolphin_run w SRC.ACT.REMOVE VAR.PX VAR.PY IF (<VAR.ISONWATER> == 8) VAR.ISONWATER RETURN 1 ENDIF VAR.ISWATER RETURN 0 [CHARDEF c_dummy_dolphin] ID=c_dolphin ON=@Click RETURN 1 [FUNCTION dolphin_run] RUN <ARGS> IF (<P.X> != <VAR.PX> ) || (<P.Y> != <VAR.PY> ) VAR.ISONWATER <VAR.ISONWATER> + 1 ENDIF P <HOME> |