Annapolis Ultima Online Shard

Join Our Forum! Save the cheerleader, save the world!
 
HomeFAQSearchRegisterMemberlistUsergroupsLog inReport Check

Share | 
 

 Auto Buy Machines

Go down 
AuthorMessage
^TayfuN^
Annapolis Owner
Annapolis Owner
avatar

Number of posts : 256
Main Character Name : TayfuN
Registration date : 2007-06-29

PostSubject: Auto Buy Machines   Wed Aug 15, 2007 7:23 pm

How you think about this idea:

On Market or somewere else will be pedestals named Auto Buy Machines, the owner put on pedistal 2 resources (example 2 arrows) and in ABM choice price for 1 arrow, also the owner puting money on ABM for what he buys resources, player have 100 arrows and the price for 1 arrow 5 gp when he Dclicing on ABM and clicking target on arrows he losing his 100 arrows and takes 500 gp.

If you HAve any questions, post they here Razz

I can answer on they in 5 minutes, after i will go sleep Sleep becouse i have 1:25 AM Cool
Back to top Go down
View user profile http://annapolis.forummotion.com/
Marco
Moderator
Moderator
avatar

Number of posts : 837
Main Character Name : Avril
Registration date : 2007-06-29

PostSubject: Re: Auto Buy Machines   Wed Aug 15, 2007 9:04 pm

I have a question.

Do you have it scripted? :}

_________________
My sweet smile!!! <3









BEM SARADA MESMO.

REI DA MATEMÁTICA É LEGIT.

TEAM DARVIN - FK JONATHAN
Back to top Go down
View user profile
^TayfuN^
Annapolis Owner
Annapolis Owner
avatar

Number of posts : 256
Main Character Name : TayfuN
Registration date : 2007-06-29

PostSubject: Re: Auto Buy Machines   Thu Aug 16, 2007 5:05 am

Yes, but it needs fixes Razz and testing
Back to top Go down
View user profile http://annapolis.forummotion.com/
^TayfuN^
Annapolis Owner
Annapolis Owner
avatar

Number of posts : 256
Main Character Name : TayfuN
Registration date : 2007-06-29

PostSubject: Re: Auto Buy Machines   Thu Aug 16, 2007 5:17 am

Code:

[ITEMDEF i_autobuy4]
NAME=Automatic Vendor Machine
ID=1508
CATEGORY=Special Items
SUBSECTION=Stones
DESCRIPTION=Automatic Vendor Machine
COLOR=LAVA_ARMOR_COLOR
DYE=0
ONTRIGGER=DCLICK
if (<distance> <3)
  SRC.ITEMMENU 500
  RETURN 1
else
  src.sysmessage You are too far away
  return 1
endif
ONTRIGGER=SPELL
RETURN 1
[ITEMDEF i_autobuy3]
NAME=Automatic Vendor Machine
ID=151C
CATEGORY=Special Items
SUBSECTION=Stones
DESCRIPTION=Automatic Vendor Machine
COLOR=LAVA_ARMOR_COLOR
DYE=0
ONTRIGGER=DCLICK
if (<distance> <3)
  SRC.ITEMMENU 500
  RETURN 1
else
  src.sysmessage You are too far away
  return 1
endif
[ITEMDEF i_autobuy7]
NAME=Free for AutoBuy
ID=0e57
ATTR=010
COLOR=0
CATEGORY=Provisions - GM Items
SUBSECTION=Special Items
DESCRIPTION=Place for AutoBuy
ONTRIGGER=DCLICK
IF <more2> > 0
 SRC.SYSMESSAGE=Место для установки автоскупочной машины <uid.<more2>.name>
 return 1
else
 SRC.MESSAGE=Свободное место для
 SRC.MESSAGE=установки автоскупочной машины
 return 1
endif
[ITEMDEF i_autobuy2]
//Tsupilo
ID=01223
NAME=Auto Buy Machine
attr=0
TYPE=13
weight=15
hitpoints=100
CATEGORY=Provisions - GM Items
SUBSECTION=Special Items
DESCRIPTION=Auto Buy Machine
ONTRIGGER=DCLICK
IF (<SRC.UID>=01F497)
 IF (<TIMER>=-1)
  SRC.SYSMESSAGE=Ошибка таймера машины!
  TIMER=1
  RETURN 1
 ENDIF
ENDIF
IF (<link>!=04fffffff)&&(<more>!=<link.baseid>)
 SRC.MESSAGE= Attention! Please call GM Page!
 RETURN 1
 //more=<link.baseid>
endif
IF (<ATTR>&04) //MOREZ>=1)
 MOREX=0
// MOREZ=0
 ATTR=<ATTR>&~04
 COLOR=0486
 IF <TIMER>=-1
  TIMER=2400
 ENDIF
 UPDATE
 RETURN 1
ENDIF
IF (<TIMER>=-1)
 TIMER=1200
ENDIF
IF (<SRC.FLAGS>&01)
 RETURN 0
ENDIF
IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
 SRC.SYSMESSAGE You have too many items in your backpack!
 RETURN 1
ENDIF
IF <SRC.FINDTYPE.54.CONT.UID>
 return 1
endif
IF (<MOREX><31000)&&(<MOREZ>>0)
 var.ostbuy=<VALSTR((32000+(-<MOREX>))/1000)>
 IF (<MOREZ> > <var.ostbuy>) //<VALSTR((32000+(-<MOREX>))/1000)>)
  MOREZ=<MOREZ>+(-<var.ostbuy>)  // VALSTR((32000+(-<MOREX>))/1000)>)
  MOREX=<MOREX>+<VALSTR(<var.ostbuy>*1000)>
//  src.say=<var.ostbuy>  mr <morex>  ee <morez>
 ELSE
  MOREX=<MOREX>+<VALSTR(<MOREZ>*1000)>
  MOREZ=0
 ENDIF
ENDIF
IF (<MORE2>!=<SRC.SERIAL>)
 IF (<COLOR>=0486)
  IF (<LINK>=04FFFFFFF)
  SRC.MESSAGE= Attention! This machinen not have cash or full! Only <TIMER> sec for programming!
  ELSE
  IF (<SRC.FLAGS>&01) //&& (<TIMER> =-1)
    TIMER=2400
    LINK.MOREY=108
  ENDIF
  SRC.MESSAGE= Attention! This machinen not have cash or full! Only <VALSTR(<VALSTR(<TIMER>/60)>+<valstr(<link.morey>*40)>)> min for recharge!
  ENDIF
  RETURN 1
 ELSEIF (<COLOR>=06) //&&(<ATTR>!&010)
  RETURN 1
 ELSEIF (<MORE>=00)
  SRC.MESSAGE= Attention! This machinen not item programen!
  COLOR=0486
  IF <TIMER>=-1
  TIMER=2400
  ENDIF
  UPDATE
  RETURN 1
 ELSEIF (<link> =04fffffff)
  SRC.MESSAGE= Attention! This machinen not price programen!
  COLOR=0486
  IF <TIMER>=-1
  TIMER=2400
  ENDIF
  UPDATE
  RETURN 1
 ELSEIF (<link.morex> < 1)
  SRC.MESSAGE= Attention! This machinen not price programen!
  COLOR=0486
  IF <TIMER>=-1
  TIMER=2400
  ENDIF
  UPDATE
  RETURN 1
 ELSEIF (<MORE2>=0)
  SRC.MESSAGE= Attention! This machinen bad!
  IF <TIMER>=-1
  TIMER=2400
  ENDIF
  RETURN 1
 ELSEIF !(<attr>&010)
  SRC.MESSAGE= Attention! This machinen bad!
  IF <TIMER>=-1
  TIMER=2400
  ENDIF
  RETURN 1
 ENDIF
endif
ONTRIGGER=TARGON_ITEM
IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
 SRC.SYSMESSAGE You have too many items in your backpack!
 RETURN 1
ENDIF
IF <SRC.FINDTYPE.54.CONT.UID>
 return 1
endif
IF (<LINK>!=04FFFFFFF)&&(<SRC.TARGET.SERIAL>=<LINK>)&&(<SRC.FLAGS>&01)
  TIMER=2400
  LINK.MOREY=108
  COLOR=0486
  UPDATE
  RETURN 1
ENDIF
IF (<SRC.TARGET.SERIAL>=<SERIAL>) && (<MORE2>=<SRC.SERIAL>)
 IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
  SRC.SYSMESSAGE You have too many items in your backpack!
  RETURN 1
 ENDIF
 TOME 120
 return 1
endif
IF (<CONT.SERIAL>=<SRC.FINDLAYER(21).SERIAL>)
 RETURN 1
ENDIF
IF (<SRC.TARGET.CONT.CONT.UID>=<SRC.UID>)
 IF (<MORE2>=<SRC.SERIAL>)
  IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
  SRC.SYSMESSAGE You have too many items in your backpack!
  RETURN 1
  ENDIF
  IF !(<ATTR>&010)
  SRC.SYSMESSAGE= Need locked this Auto Buy Machine
  TOME 120
  return 1
  endif
  IF (<SRC.TARGET.ID>=GOLD)
  IF (<moreY>) > 15000
    SRC.MESSAGE= This Machine is full! You must empty the Auto Buy Machine!
    RETURN 1
  ENDIF
//  SRC.MESSAGE= Attention!<SRC.TARGET.amount>+<more2> tyta!
  IF (<SRC.TARGET.AMOUNT>=30001)&&(<MOREZ><91)
    MOREZ=<MOREZ>+30
    SRC.MESSAGE=Сумма 30000gp принята в резерв!
    SRC.TARGET.REMOVE
    return 1
  ENDIF
  IF ((<SRC.TARGET.amount>)+<moreX> >32750)
    SRC.MESSAGE= Attention! Machinen can storage max 32750gp! Only<valstr(<moreX>+(-32750))>gp you can give this machine.
  else
    SRC.MESSAGE= You download <SRC.TARGET.AMOUNT> gp!
    moreX=<moreX>+<SRC.TARGET.amount>
    IF (<link> !=4FFFFFFF)
    IF (<link.morex> > 0) && (<MORE>!=0) && (<MOREX> > <AMOUNT>)
      IF (<TIMER>=-1)
      TIMER=1
      ENDIF
      COLOR=0487
      UPDATE
    ENDIF
    endif
    SRC.TARGET.REMOVE
  endif
  ELSEIF (<SRC.TARGET.TYPE>=43)||(<SRC.TARGET.TYPE>=42)||(<SRC.TARGET.TYPE>=48)||(<SRC.TARGET.TYPE>=63)||(<SRC.TARGET.BASEID>=SCROLL_BLANK)||(<SRC.TARGET.ID>=01078)||(<SRC.TARGET.BASEID>=BOTTLE_EMPTY)||(<SRC.TARGET.ID>=LOG)||(<SRC.TARGET.ID>=01bf2)||(<SRC.TARGET.ID>=01067)||(<SRC.TARGET.BASEID>=01BD1)||(<SRC.TARGET.ID>=01bef)
  IF (<MOREY> > 0)
    SRC.SYSMESSAGE= Attention! Your Auto buy machine have buyer <link.name>! You must empty the Auto Buy Machine!
    return 1
  endif
  LINK.REMOVE
  MORE=<SRC.TARGET.BASEID>
  NAME=for <SRC.TARGET.NAME> buy <uid.<more2>.name>
  SRC.NEWITEM=<MORE>
  SRC.ACT.AMOUNT=2
  SRC.ACT.P=<P>
  SRC.ACT.NUDGEUP=9
  src.act.attr=010
  src.act.type=24
  src.act.TIMER=-1
  SRC.ACT.UPDATE
  LINK=<SRC.ACT.SERIAL>
  link.morex=1
  tome 120
  ELSEIF (<SRC.TARGET.ID>=0F95)
  IF (<MOREY> > 0)
    SRC.SYSMESSAGE= Attention! Your Auto buy machine have buyer <link.name>! You must empty the Auto Buy Machine!
    return 1
  endif
  LINK.REMOVE
  MORE=<SRC.TARGET.ID>
  NAME=for <SRC.TARGET.NAME> buy <uid.<more2>.name>
  SRC.NEWITEM=<MORE>
  SRC.ACT.AMOUNT=2
  SRC.ACT.P=<P>
  SRC.ACT.NUDGEUP=7
  src.act.attr=010
  src.act.type=0
  src.act.TIMER=-1
  SRC.ACT.UPDATE
  LINK=<SRC.ACT.SERIAL>
  link.morex=1
  tome 120
  ELSE
  SRC.MESSAGE= This item can't linked for Auto Buy Machine
  return 1
  endif
 ELSE
  IF (<link>!=4fffffff)
  IF (<SRC.TARGET.BASEID>=<MORE>)
    IF (<MOREY>+<SRC.TARGET.amount> <32001)
    IF (<SRC.TARGET.amount>*<link.morex> > <morex>)
      SRC.MESSAGE= Attention! This Machine not have <VALSTR(<SRC.TARGET.amount>*<link.morex>)>gp! You can sell only <valstr(<morex>/<link.morex>)> items!
    else
          MOREY=<MOREY>+<SRC.TARGET.amount>
      MOREX=<MOREX>+(-<SRC.TARGET.amount>*<link.morex>)
      SRC.TARGET.remove
      SRC.MESSAGE= You selling <SRC.TARGET.amount> <SRC.TARGET.name> over <VALSTR(<SRC.TARGET.amount>*<link.morex>)>gp!
      SRC.NEWITEM=GOLD
      SRC.ACT.AMOUNT=(<SRC.TARGET.amount>*<link.morex>)
      SRC.ACT.ATTR=02
      IF (<SRC.ACT.BASEID>=0EED)
      SRC.ACT.BOUNCE
      ENDIF
      SRC.ACT.UPDATE
    ENDIF
    ELSE
    SRC.MESSAGE= Attention! This Machine nearly if full! You can sell only <valstr(32000+(-<morey>))> items!
    return 1 
    endif
    IF (<link.morex> > <MOREX>) || (<morey> > 29999)
    TIMER=2400
    LINK.MOREY=108
    COLOR=0486
    UPDATE
    ENDIF
    //return 1
  ELSE
    SRC.MESSAGE= Attention! Program this Machine: <name>!
    return 1
  endif
  else
  SRC.MESSAGE=  Attention! This machinen not price programen!!
  endif
 endif
ELSE
 SRC.SYSMESSAGE=Item need in your backpack!
 return 1
ENDIF
return 1
ONTRIGGER=TARGON_char
IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
 SRC.SYSMESSAGE You have too many items in your backpack!
 RETURN 1
ENDIF
IF (<MORE2>=<SRC.SERIAL>)
 IF (<color>=06)
  SRC.SAY=Attention! New owner this Machine - <SRC.TARGET.NAME>!
  uid.0400092f6.more=<more2>
  more2=<SRC.TARGET.serial>
  uid.0400092f6.more2=<more2>
  uid.0400092f6.morep=<p>
  name=<SRC.TARGET.NAME>'s Auto Buy Machine
 ELSE
  IF (<COLOR>=0486)
  IF (<LINK>=04FFFFFFF)
    SRC.MESSAGE= Attention! This machinen not have cash or full! Only <TIMER> sec for programming!
  ELSE
    SRC.MESSAGE= Attention! This machinen not have cash or full! Only <VALSTR(<VALSTR(<TIMER>/60)>+<valstr(<link.morey>*40)>)> min for recharge!
  ENDIF
  ENDIF
  SRC.MESSAGE=Only unlock Machine can transfers!
 endif
 return 1
else
 SRC.MESSAGE=Attention! Program this Machine: <name>!
endif
return 1
ONTRIGGER=TARGON_ground
SRC.MESSAGE=Attention! Program this Machine: <name>!
return 1
ONTRIGGER=SPELL
RETURN 1
ONTRIGGER=TIMER
IF <COLOR>=0487
 if <morex> > 10
  morex=<morex>+(-10)
 else
  morex=0
  TIMER=2400
  LINK.MOREY=108
  COLOR=0486
  UPDATE
  RETURN 1
 endif
 TIMER=1200
 RETURN 1
endif
IF !(<LINK> = 04FFFFFFF)
 IF (<LINK.MOREY> > 0)
  LINK.MOREY=<LINK.MOREY>+(-1)
  TIMER=2400
  RETURN 1
 ELSE
  LINK.REMOVE
 ENDIF
ENDIF
LINK=<MORE2>
LINK.NEWITEM=062BB
LINK.ACT.P=<P>
uid.0400092f6.more=<more2>
LINK.ACT.TIMER=-1
IF ((<LINK.WEIGHT>) > (<LINK.STR>*40))
 LINK.STR=<LINK.STR>+5000
  NAME=Auto Buy of <LINK.NAME>
  LINK.BOUNCE=<SERIAL>
 LINK.STR=<LINK.STR>+(-5000)
 LINK=04FFFFFFF
ELSE
 NAME=Auto Buy of <LINK.NAME>
 LINK.BOUNCE=<SERIAL> //<LINK.TARG.SERIAL>
 LINK=04FFFFFFF
ENDIF
TIMER=-1
update
RETURN 1
ONTRIGGER=PICKUP_GROUND
IF (<SRC.FLAGS>&01)
 RETURN 0
ENDIF
RETURN 1
if (<src.uid>!=<more2>)
  src.sysmessage It's not your item!!!
  return 1
endif
ONTRIGGER=PICKUP_PACK
IF (<SRC.FLAGS>&01)
 RETURN 0
ENDIF
RETURN 1
[ITEMDEF i_autobuy]
//Tsupilo
ID=HOUSE_DEED
COLOR=006
NAME=Deed to a Auto Buy Machine
TYPE=13
HITPOINTS=1000
//attr=0
BUYVALUE=500000
SELLVALUE=9500
CATEGORY=Provisions - Deeds
SUBSECTION=Items
DESCRIPTION=Deed Auto Buy Machine
ONTRIGGER=SPELL
RETURN 1
ONTRIGGER=DCLICK
IF ((<SRC.WEIGHT>) > (<SRC.STR>*40))||(<SRC.RESTEST 1 0208F>)||(<SRC.RESTEST 1 02090>)
 SRC.MESSAGE You have too many items in your backpack!
 RETURN 1
ENDIF
IF !(<CONT.UID>==<SRC.FINDLAYER(21).UID>)
 SRC.SYSMESSAGE This item needs to be your backpack!
 RETURN 1
ENDIF
IF <TYPE>=0
 TYPE=13
 RETURN 1
ENDIF
ONTRIGGER=TARGON_ITEM
IF (<SRC.TARG.BASEID>=062BB)
 IF (<SRC.TARG.DISTANCE> > 3)
  SRC.SYSMESSAGE=Your target is too far away from you!
  RETURN 1
 ENDIF
 IF !(<SRC.TARG.MORE2>=<SRC.UID>)&&(<SRC.TARG.MORE2> > 0)
  SRC.SYSMESSAGE=This place is not accessible to you!
  RETURN 1
 ENDIF
 SRC.NEWITEM=062DD
 SRC.ACT.MORE2=<SRC.SERIAL>
 SRC.ACT.COLOR=06
 SRC.ACT.ATTR=010
 SRC.ACT.NAME=<SRC.NAME> <SRC.ACT.NAME>
 SRC.ACT.P=<SRC.TARG.P>
 uid.0400092f6.more2=<src.uid>
 uid.0400092f6.morep=<src.targ.p>
 SRC.TARG.REMOVE
 SRC.ACT.UPDATE
 REMOVE
 RETURN 1
ELSE
 if (<src.findlayer(98).more2>&010)
  SRC.SYSMESSAGE=Устанавливать можно только на специальные места
 ELSE
  SRC.SYSMESSAGE=Can be set in special places only
 ENDIF
ENDIF
RETURN 1
ONTRIGGER=TARGON_CHAR
RETURN 1
ONTRIGGER=TARGON_GROUND
RETURN 1
Back to top Go down
View user profile http://annapolis.forummotion.com/
Marco
Moderator
Moderator
avatar

Number of posts : 837
Main Character Name : Avril
Registration date : 2007-06-29

PostSubject: Re: Auto Buy Machines   Thu Aug 16, 2007 1:55 pm

Need russian off too.

I can help you with Fix and Tests Very Happy

_________________
My sweet smile!!! <3









BEM SARADA MESMO.

REI DA MATEMÁTICA É LEGIT.

TEAM DARVIN - FK JONATHAN
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Auto Buy Machines   

Back to top Go down
 
Auto Buy Machines
Back to top 
Page 1 of 1
 Similar topics
-
» ALIEN/S & STARSHIP TROOPERS MICRO MACHINES/ ACTION FLEET
» Clutch Assembly OEM
» Orion_Auto_0.4 ctg
» vts payah nak idup engin
» have you heard of micro machines

Permissions in this forum:You cannot reply to topics in this forum
Annapolis Ultima Online Shard :: General Discussion Forums :: Development Discussion :: Need Work-
Jump to: