Ok im just gonna post my how tos here so that i dont have to keep making a thread each time.
How to #1 Adding Weight
Ok how do i add weight to an item such as an iron dagger that weighs 3 pounds and then displays it along with the max weight (30lbs for example)
How to #2 Disabling movement
When you pick up to many items or are paralyzed by a spell you will not be able to move and a message will be sent to you
ID:156676
![]() Aug 16 2010, 5:20 pm
|
|
You could use mob/Entered() and mob/Exited() to keep track of weight, but you'd have to remember to never set an items location directly.
obj/your_item_subtype/var/weight A formula for slowing might be nice too. |
Ok thanks
How to #3 Stacking objects How would i combine certain objects of the same type in my inventory such as arrows or gold How to #4 stoping objects How do i stop an arrow or magic from moving after a certain amount of spaces (20 spaces for example) |
Make a amount var and name the obj "[name] x[amount] with the new proc". Add O.amount+=1 to get verb,etc.
look up the while proc. var/distance=12 while(distance) step |
How To #5 Day and Night
How do i create day and night that switches every 12 min and displays a message How to #6 Time Sensitive Events How do i make it so a mob takes damage at certain times like a vampire in the sun |
#5: Have a procedure defined that will change day to night and vice-versa every 12 minutes. Easy, no? Well, actually, it is that easy.
#6: Set up a procedure and call it when the day changes. You want to call it manually when the mob logs in as well! world/New() // When the game starts |
How to #8 Horses
how do i make it so that horses can be ridden and it increases speed and disables some all verbs except talk and get off |
You need to get a start on things. Learn on your own, and present your ideas of how you feel you should program something with possibly a sample snippet. You shouldn't ask others to do all of the work for you! Else, you won't learn how to do work for yourself.
For a 'horse' to be ridden, you would simply delete the mob, add an horse underlay to the mob, and edit the 'set hidden' variable with verbs to show/hide them. For speed, you can just sleep(whatever) in move. |
For weight id suggest you set up some variables inside your equip and unequip procs and have the mob have a maxweight var.
So each object has a weight and when they exceed it they cant move or w.e
meh i think i got that move thing right. prolly didnt though