![]() |
Farming Script
Hey guys. I'm coming back to graal and trying to adapt to gs2. It's going decent so far. There isn't much documentation. I'm working on a farming script for a bit of practice and was hoping I could get a little insight.
Pretty much, I am going to make a class NPC which will hold the code for the actual plant, a weapon npc for seeds which when used will trigger the class. I can't seem to find many examples or anything remotely close to learn from. Would anyone happen to have an example? Or maybe a bit of elaboration on what I am trying to do. it doesn't seem too difficult, I just loose myself a bit and don't know which direction to go. Thanks. |
You can use putnpc2() serverside to place the plant, and of course check if other plants are in the area of the new one before planting.
http://forums.graalonline.com/forums...57&postcount=3 |
Thanks. That helps alot. What would be the best way to check in front of the player? I know I can use tomething like tile(x,y). But how would I check about 2 tiles in front of the player without having to do manually code each direction? I know it would have something to do with vecx,vecy.
|
This is pretty much the standard for getting the coordinates in front of the player.
PHP Code:
|
| All times are GMT +2. The time now is 08:02 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.