//Animal selling and training. //Stabling is POL style: Pay 50 gold, get a deed, take the deed to a //trainer (although in this script, the trainer must be within a certain //distance of the trainer that the animal was stabled at, for realism) //and get the animal back. //v1.0, by Rudenid //Installation instructions: //The speech block below should be added to the tamer NPC's definition. [SPEECH spk_trainer_commands] ON=*sell*animal* SAY You want to sell an animal to me? Show it to me. SRC.NEWITEM i_animal_sell SRC.ACT.LINK= SRC.ACT.EQUIP ON=*Retrieve* IF ==BRAIN_ANIMAL_TRAINER PETRETRIEVE SAY If you want to retrieve any more animals, you'll need to show me the deed. SRC.NEWITEM i_animal_stable_retrieve SRC.ACT.LINK= SRC.ACT.EQUIP ENDIF ON=*Stable* IF ==BRAIN_ANIMAL_TRAINER SAY It costs 50 gold to stable an animal... the deed you'll get is good anywhere near these parts. SRC.NEWITEM i_animal_stable SRC.ACT.LINK= SRC.ACT.EQUIP ENDIF [ITEMDEF i_animal_sell] ID=i_memory TYPE=t_eq_script NAME=Sell an animal ON=@Create ATTR=attr_move_never|attr_invis ON=@Equip TARGET Choose the animal to sell TIMER=60 ON=@TARGON_ITEM SRC.SYSMESSAGE That is not an animal. REMOVE RETURN 1 ON=@TARGON_CHAR IF !() LINK.SAY Are you tryin' to pull a fast one on me? This ain't your animal. REMOVE RETURN 1 ENDIF IF ( != brain_animal) LINK.SAY 'Fraid I have no use for . REMOVE RETURN 1 ENDIF IF ( & statf_conjured) LINK.SAY This animal ain't real! REMOVE RETURN 1 ENDIF IF ( = ) LINK.SAY I'm not interested in slaves, jus' animals. REMOVE RETURN 1 ENDIF VAR.GOLDFORANIMAL= + + > VAR.GOLDFORANIMAL= + >> VAR.GOLDFORANIMAL= + > IF (>.VALUE> > 0) IF (> > >.VALUE> * 85) / 100>) VAR.GOLDFORANIMAL=>.VALUE> * 85) / 100> ENDIF ENDIF IF (> < 1) VAR.GOLDFORANIMAL=1 ENDIF IF (> > 5000) LINK.SAY 'Fraid I can't afford that animal. VAR.GOLDFORANIMAL= REMOVE RETURN 1 ENDIF LINK.SAY Hmm... here's > gold for . CONT.NEWITEM i_gold CONT.ACT.AMOUNT=> CONT.ACT.CONT= SRC.TARG.REMOVE VAR.GOLDFORANIMAL= REMOVE RETURN 1 ON=@Timer LINK.SAY Yer' taking too long to choose, and I've better things to do than wait for ya. REMOVE RETURN 1 [ITEMDEF i_animal_stable] ID=i_memory TYPE=t_eq_script NAME=Stable an animal ON=@Create ATTR=attr_move_never|attr_invis ON=@Equip TARGET Choose the animal to stable TIMER=60 ON=@TARGON_ITEM SRC.SYSMESSAGE That is not an animal. REMOVE RETURN 1 ON=@TARGON_CHAR IF !() LINK.SAY Are you tryin' to pull a fast one on me? This ain't your animal. REMOVE RETURN 1 ENDIF IF ( != brain_animal) LINK.SAY 'Fraid I'm not able to care for . REMOVE RETURN 1 ENDIF IF ( & statf_conjured) LINK.SAY This animal ain't real, and there's no reason to stable it. REMOVE RETURN 1 ENDIF IF ( = ) LINK.SAY I'm not interested in slaves, jus' animals. REMOVE RETURN 1 ENDIF IF !() LINK.SAY You don't have enough gold. REMOVE RETURN 1 ENDIF LINK.SAY ? Don't worry, I'll take good care of it. SRC.CONSUME 50 i_gold SRC.NEWITEM=i_deed_animal SRC.ACT.NAME=Deed to SRC.ACT.TAG.ANIMALNAME= SRC.ACT.TAG.ORIGINREGION= SRC.ACT.TAG.ORIGINPX= SRC.ACT.TAG.ORIGINPY= SRC.ACT.COLOR= SRC.ACT.MORE1= SRC.ACT.BOUNCE SRC.TARG.REMOVE REMOVE RETURN 1 ON=@Timer LINK.SAY Yer' taking too long to choose, and I've better things to do than wait for ya. REMOVE RETURN 1 [ITEMDEF i_animal_stable_retrieve] ID=i_memory TYPE=t_eq_script NAME=Retrieve an animal ON=@Create ATTR=attr_move_never|attr_invis ON=@Equip TARGET Choose the deed to show to the tamer. TIMER=60 ON=@TARGON_ITEM IF ( != i_deed_animal) LINK.SAY This don't look like an animal deed to me. REMOVE RETURN 1 ENDIF SRC.NEWITEM i_gold SRC.ACT.ATTR=attr_invis|attr_decay SRC.ACT.P=>,> SRC.ACT.TIMER=5 IF ( > 2000) LINK.SAY Yer' way too far from the stable you got this from. We don't have an animal like that here. SRC.ACT.REMOVE REMOVE RETURN 1 ENDIF SRC.ACT.REMOVE SRC.NEWITEM >.ICON> SRC.ACT.COLOR= SRC.ACT.NAME= SRC.ACT.LINK= SRC.ACT.MORE1= SRC.TARG.REMOVE SRC.ACT.P= SRC.ACT.DCLICK LINK.SAY You take good care of it now... REMOVE RETURN 1 ON=@TARGON_CHAR SRC.SYSMESSAGE This is not an animal deed. REMOVE RETURN 1 [ITEMDEF i_deed_animal] ID=i_map_rolled TYPE=t_eq_script NAME=deed to an animal VALUE=50 ON=@DClick SRC.SYSMESSAGE Take that to an animal tamer near to claim . RETURN 1