Thread: [PI] Redoing Teleport System

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 [PI] Redoing Teleport System 
    Registered Member
    Join Date
    Oct 2013
    Posts
    775
    Thanks given
    48
    Thanks received
    104
    Rep Power
    14
    this is nothing great, still similar to pi's original system, just a little cleaner, posting for reviews on ways to improve it or for public use.

    Code:
    package server.game.content.travel;
    
    import java.util.HashMap;
    import java.util.Map;
    
    public enum TeleportType {
    	ANCIENT(1979, 0, 392, 9), 
    	//LUNAR, 
    	//NORMAL, 
    	//TAB, 
    	//JEWELLERY, 
    	//OBELISK, 
    	NONE(-1, -1, -1, 0),
    	;
    	
    	private int anim, endingAnim, gfx, timer;
    	
    	public int getAnim() {
    		return anim;
    	}
    	
    	public int getEndAnim() {
    		return endingAnim;
    	}
    	
    	public int getGfx() {
    		return gfx;
    	}
    	
    	public int getTimer() {
    		return timer;
    	}
    	
    	private TeleportType(int anim, int endingAnim, int gfx, int timer) {
    		this.anim = anim;
    		this.endingAnim = endingAnim;
    		this.gfx = gfx;
    		this.timer = timer;
    	}
    	
    	private static Map<Integer, TeleportType> teleType = new HashMap<Integer, TeleportType>();
    
    	static {
    		for (final TeleportType type : values()) {
    			teleType.put(type.ordinal(), type);
    		}
    	}
    
    	public static TeleportType forId(int id) {
    		return teleType.get(id);
    	}
    	
    }
    Code:
    package server.game.content.travel;
    
    import server.event.CycleEvent;
    import server.event.CycleEventContainer;
    import server.event.CycleEventHandler;
    import server.game.entity.Position;
    import server.game.entity.players.Player;
    import server.world.midi.Sound;
    
    /**
     * Handles the movement and teleporting of a player
     * @author Final Project
     *
     */
    public class Teleport {
    
    	/**
    	 * What the current teleport type will be
    	 */
    	private TeleportType teleportType;
    
    	/**
    	 * Sets the teleport type being used
    	 */
    	private TeleportType setTeleType(TeleportType type) {
    		return teleportType = type;
    	}
    
    	/**
    	 * The location of the movement/teleport
    	 */
    	private Position newPosition;
    
    	/**
    	 * Sets the new location to move to
    	 * @param newPos
    	 * 			the location to move to
    	 */
    	private Position setPosition(Position newPos) {
    		return newPosition = newPos;
    	}
    
    	/**
    	 * Constructor that begins the new teleport
    	 * @param player
    	 * 			the player being moved
    	 * @param location
    	 * 			the location to move the player to
    	 * @param teleType
    	 * 			the teleport type being used
    	 * @param isForced
    	 * 			is the movement forced
    	 */
    	public Teleport(Player player, Position location, TeleportType teleType, boolean isForced) {
    		setPosition(location);
    		setTeleType(teleType);
    		teleportAction(player, isForced);
    	}
    
    	/**
    	 * The requirements to perform a teleport or movement
    	 * @param teleporter
    	 * 			the teleporter to check for requirements
    	 * @return
    	 * 			if the teleporter meets the requirements and can teleport
    	 */
    	private boolean canTeleport(Player teleporter) {
    		if (teleporter.inTrade) {
    			return false;
    		}
    		return true;
    	}
    
    	/**
    	 * The beginning preparations of a movement or teleport
    	 * @param teleporter
    	 * 			the teleporter being moved or teleported
    	 * @param force
    	 * 			is the movement or teleport forced
    	 */
    	private void teleportAction(Player teleporter, boolean force) {
    		if (!force) {
    			if (!canTeleport(teleporter)) {
    				return;
    			}
    		}
    		if (teleportType != TeleportType.NONE) {
    			teleporter.getPacketSender().sendSound(Sound.TELEPORT);
    		}
    		TeleportType teleType = TeleportType.forId(teleportType.ordinal());
    		teleporter.startAnimation(teleType.getAnim());
    		teleporter.gfx0(teleType.getGfx());
    		teleporter.teleTimer = teleType.getTimer();
    		CycleEventHandler.getSingleton().addEvent(teleporter, new CycleEvent() {
    
    			@Override
    			public void execute(CycleEventContainer container) {
    				if (teleporter.teleTimer == 0) {
    					container.stop();
    					return;
    				}
    				if (teleporter.teleTimer > 0) {
    					teleporter.teleTimer--;
    					if (!teleporter.isDead) {
    						if (teleporter.teleTimer == 5) {
    							teleporter.teleTimer--;
    							finalizeTeleport(teleporter);
    						}
    						if (teleporter.teleTimer == 9 && teleporter.teleGfx > 0) {
    							teleporter.teleTimer--;
    							teleporter.gfx100(teleporter.teleGfx);
    						}
    					}
    				}
    			}
    
    			@Override
    			public void stop() {
    				if (teleportType == TeleportType.NONE) {
    					finalizeTeleport(teleporter);
    				}
    				teleporter.teleTimer = 0;
    				setTeleType(null);
    			}
    
    		}, 1);
    		teleporter.teleEndAnimation = teleType.getEndAnim();
    	}
    
    	/**
    	 * Finishes the movement or teleport and moves the teleporter to the new location
    	 * @param teleporter
    	 * 			the teleporter
    	 */
    	private void finalizeTeleport(Player teleporter) {
    		teleporter.teleportToX = newPosition.getX();
    		teleporter.teleportToY = newPosition.getY();
    		teleporter.heightLevel = newPosition.getZ();
    		if (teleporter.teleEndAnimation > 0 && teleportType != TeleportType.NONE) {
    			teleporter.startAnimation(teleporter.teleEndAnimation);
    		}
    	}
    
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,489
    Thanks given
    179
    Thanks received
    651
    Rep Power
    1311
    I remember doing something similar for Wildercress a while back ago, I just had to make a few edits to Lare's system. Maybe you can use this as a reference to improve what you currently have.

    Code:
    package com.wc.game.character.player.content.spellbook;
    
    import com.wc.game.World;
    import com.wc.game.character.Animation;
    import com.wc.game.character.Graphic;
    import com.wc.game.character.player.Player;
    import com.wc.game.location.Position;
    import com.wc.task.Task;
    
    /**
     * Manages the Spell books for players.
     * @author <a href="http://www.rune-server.ee/members/stand+up/">Stand Up</a>
     */
    public final class SpellbookManager {
    
    	/**
    	 * The standard spellbook the player has open.
    	 */
    	private Spellbook spellbook = Spellbook.NORMAL;
    
    	/**
    	 * The enumerated type whose elements represent a spellbook type.
    	 * @author lare96 <http://github.com/lare96>
    	 */
    	public enum Spellbook {
    		NORMAL(1151) {
    			@Override
    			public void execute(Player player, Position position) {
    				player.animation(new Animation(714));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(308));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.move(position);
    							player.animation(new Animation(715));
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		},
    		ANCIENT(12855) {
    			@Override
    			public void execute(Player player, Position position) {
    				player.animation(new Animation(1979));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(392));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.setTeleportStage(4);
    						} else if(player.getTeleportStage() == 4) {
    							player.move(position);
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		},
    		LUNAR(29999) {
    			@Override
    			public void execute(Player player, Position position) {//TODO replace this to correct lunar home teleport
    				player.animation(new Animation(714));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(308));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.move(position);
    							player.animation(new Animation(715));
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		};
    
    		/**
    		 * The identifier for this spellbook interface.
    		 */
    		private final int id;
    
    		/**
    		 * Creates a new {@link Spellbook}.
    		 * @param id the identifier for this spellbook interface.
    		 */
    		private Spellbook(int id) {
    			this.id = id;
    		}
    
    		@Override
    		public final String toString() {
    			return name().toLowerCase().replaceAll("_", " ");
    		}
    
    		/**
    		 * Attempts to convert the spellbook for {@code player} to {@code book}.
    		 * @param player the player to convert the spellbook for.
    		 * @param book   the type of spellbook to convert to.
    		 */
    		public static void convert(Player player, Spellbook book) {
    			if(player.getSpellbookManager().getSpellbook() == book) {
    				player.getMessages().sendMessage("You have already converted to " + book + " magics!");
    				return;
    			}
    			player.getMessages().sendSidebarInterface(6, book.id);
    			player.getSpellbookManager().setSpellbook(book);
    		}
    
    		/**
    		 * The method executed when {@code player} teleports to {@code position}
    		 * while converted to this spellbook type.
    		 * @param player   the player that is teleporting.
    		 * @param position the position the player is teleporting to.
    		 */
    		public abstract void execute(Player player, Position position);
    
    		/**
    		 * Gets the identifier for this spellbook interface.
    		 * @return the identifier for the interface.
    		 */
    		public final int getId() {
    			return id;
    		}
    	}
    
    	/**
    	 * @return the spellbook
    	 */
    	public Spellbook getSpellbook() {
    		return spellbook;
    	}
    
    	/**
    	 * @param spellbook the spellbook to set
    	 */
    	public void setSpellbook(Spellbook spellbook) {
    		this.spellbook = spellbook;
    	}
    }
    Code:
    package com.wc.game.character.player.content;
    
    import java.util.Optional;
    
    import com.wc.game.character.CharacterNode;
    import com.wc.game.character.Spell;
    import com.wc.game.character.player.Player;
    import com.wc.game.character.player.content.spellbook.SpellbookManager.Spellbook;
    import com.wc.game.item.Item;
    import com.wc.game.location.Position;
    
    /**
     * The spell implementation that provides additional functions exclusively for
     * teleportation spells.
     * @author lare96 <http://github.com/lare96>
     */
    public abstract class TeleportSpell extends Spell {
    
    	@Override
    	public final Optional<Item[]> equipmentRequired(Player player) {
    		return Optional.empty();
    	}
    
    	@Override
    	public final void startCast(CharacterNode cast, CharacterNode castOn) {
    
    	}
    
    	/**
    	 * The position that the caster will be moved to.
    	 * @return the teleport position.
    	 */
    	public abstract Position moveTo();
    
    	/**
    	 * The teleportation method that this spell uses.
    	 * @return the teleportation type.
    	 */
    	public abstract Spellbook type();
    }
    Then you could use something like this to teleport the players around.

    Code:
    	/**
    	 * Attempts to teleport this player somewhere based on {@code spell}.
    	 * @param spell the spell the player is using to teleport.
    	 */
    	public void teleport(TeleportSpell spell) {
    		if(viewingOrb != null || disabled)
    			return;
    		OutputMessages encoder = getMessages();
    		if(teleportStage > 0)
    			return;
    		if(wildernessLevel >= 20) {
    			encoder.sendMessage("You must be below level 20 wilderness to teleport!");
    			return;
    		}
    		if(teleblockTimer.get() > 0) {
    			int time = teleblockTimer.get() * 600;
    			if(time >= 1000 && time <= 60000) {
    				encoder.sendMessage("You must wait approximately " + ((time) / 1000) + " seconds in order to teleport!");
    				return;
    			} else if(time > 60000) {
    				encoder.sendMessage("You must wait approximately " + ((time) / 60000) + " minutes in order to teleport!");
    				return;
    			}
    		}
    		if(!MinigameHandler.execute(this, true, m -> m.canTeleport(this, spell.moveTo())))
    			return;
    		if(!spell.canCast(this))
    			return;
    		FightCavesHandler.remove(this);
    		encoder.sendWalkable(-1);
    		teleportStage = 1;
    		super.getCombatBuilder().reset();
    		faceCharacter(null);
    		setFollowing(false);
    		setFollowCharacter(null);
    		encoder.sendCloseWindows();
    		Skills.experience(this, spell.baseExperience(), Skills.MAGIC);
    		spell.type().execute(this, spell.moveTo());
    	}
    and to teleport to a position;

    Code:
    	/**
    	 * Attempts to teleport this player somewhere based on the type of spellbook
    	 * they have open.
    	 * @param position the position that the player will be moved to.
    	 */
    	public void teleport(Position position) {
    		teleport(new TeleportSpell() {
    			@Override
    			public Position moveTo() {
    				return position;
    			}
    
    			@Override
    			public Spellbook type() {
    				return spellbookManager.getSpellbook();
    			}
    
    			@Override
    			public double baseExperience() {
    				return 0;
    			}
    
    			@Override
    			public Optional<Item[]> itemsRequired(Player player) {
    				return Optional.empty();
    			}
    
    			@Override
    			public int levelRequired() {
    				return 1;
    			}
    		});
    	}
    Most credits go to Lare96.
    ~No honour among thieves.



    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Nov 2014
    Posts
    247
    Thanks given
    38
    Thanks received
    144
    Rep Power
    201
    Quote Originally Posted by Stanaveli View Post
    I remember doing something similar for Wildercress a while back ago, I just had to make a few edits to Lare's system. Maybe you can use this as a reference to improve what you currently have.

    Code:
    package com.wc.game.character.player.content.spellbook;
    
    import com.wc.game.World;
    import com.wc.game.character.Animation;
    import com.wc.game.character.Graphic;
    import com.wc.game.character.player.Player;
    import com.wc.game.location.Position;
    import com.wc.task.Task;
    
    /**
     * Manages the Spell books for players.
     * @author <a href="http://www.rune-server.ee/members/stand+up/">Stand Up</a>
     */
    public final class SpellbookManager {
    
    	/**
    	 * The standard spellbook the player has open.
    	 */
    	private Spellbook spellbook = Spellbook.NORMAL;
    
    	/**
    	 * The enumerated type whose elements represent a spellbook type.
    	 * @author lare96 <http://github.com/lare96>
    	 */
    	public enum Spellbook {
    		NORMAL(1151) {
    			@Override
    			public void execute(Player player, Position position) {
    				player.animation(new Animation(714));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(308));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.move(position);
    							player.animation(new Animation(715));
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		},
    		ANCIENT(12855) {
    			@Override
    			public void execute(Player player, Position position) {
    				player.animation(new Animation(1979));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(392));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.setTeleportStage(4);
    						} else if(player.getTeleportStage() == 4) {
    							player.move(position);
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		},
    		LUNAR(29999) {
    			@Override
    			public void execute(Player player, Position position) {//TODO replace this to correct lunar home teleport
    				player.animation(new Animation(714));
    				World.submit(new Task(1, false) {
    					@Override
    					public void execute() {
    						if(player.getTeleportStage() == 1) {
    							player.graphic(new Graphic(308));
    							player.setTeleportStage(2);
    						} else if(player.getTeleportStage() == 2) {
    							player.setTeleportStage(3);
    						} else if(player.getTeleportStage() == 3) {
    							player.move(position);
    							player.animation(new Animation(715));
    							player.setTeleportStage(0);
    							this.cancel();
    						}
    					}
    				}.attach(player));
    			}
    		};
    
    		/**
    		 * The identifier for this spellbook interface.
    		 */
    		private final int id;
    
    		/**
    		 * Creates a new {@link Spellbook}.
    		 * @param id the identifier for this spellbook interface.
    		 */
    		private Spellbook(int id) {
    			this.id = id;
    		}
    
    		@Override
    		public final String toString() {
    			return name().toLowerCase().replaceAll("_", " ");
    		}
    
    		/**
    		 * Attempts to convert the spellbook for {@code player} to {@code book}.
    		 * @param player the player to convert the spellbook for.
    		 * @param book   the type of spellbook to convert to.
    		 */
    		public static void convert(Player player, Spellbook book) {
    			if(player.getSpellbookManager().getSpellbook() == book) {
    				player.getMessages().sendMessage("You have already converted to " + book + " magics!");
    				return;
    			}
    			player.getMessages().sendSidebarInterface(6, book.id);
    			player.getSpellbookManager().setSpellbook(book);
    		}
    
    		/**
    		 * The method executed when {@code player} teleports to {@code position}
    		 * while converted to this spellbook type.
    		 * @param player   the player that is teleporting.
    		 * @param position the position the player is teleporting to.
    		 */
    		public abstract void execute(Player player, Position position);
    
    		/**
    		 * Gets the identifier for this spellbook interface.
    		 * @return the identifier for the interface.
    		 */
    		public final int getId() {
    			return id;
    		}
    	}
    
    	/**
    	 * @return the spellbook
    	 */
    	public Spellbook getSpellbook() {
    		return spellbook;
    	}
    
    	/**
    	 * @param spellbook the spellbook to set
    	 */
    	public void setSpellbook(Spellbook spellbook) {
    		this.spellbook = spellbook;
    	}
    }
    Code:
    package com.wc.game.character.player.content;
    
    import java.util.Optional;
    
    import com.wc.game.character.CharacterNode;
    import com.wc.game.character.Spell;
    import com.wc.game.character.player.Player;
    import com.wc.game.character.player.content.spellbook.SpellbookManager.Spellbook;
    import com.wc.game.item.Item;
    import com.wc.game.location.Position;
    
    /**
     * The spell implementation that provides additional functions exclusively for
     * teleportation spells.
     * @author lare96 <http://github.com/lare96>
     */
    public abstract class TeleportSpell extends Spell {
    
    	@Override
    	public final Optional<Item[]> equipmentRequired(Player player) {
    		return Optional.empty();
    	}
    
    	@Override
    	public final void startCast(CharacterNode cast, CharacterNode castOn) {
    
    	}
    
    	/**
    	 * The position that the caster will be moved to.
    	 * @return the teleport position.
    	 */
    	public abstract Position moveTo();
    
    	/**
    	 * The teleportation method that this spell uses.
    	 * @return the teleportation type.
    	 */
    	public abstract Spellbook type();
    }
    Then you could use something like this to teleport the players around.

    Code:
    	/**
    	 * Attempts to teleport this player somewhere based on {@code spell}.
    	 * @param spell the spell the player is using to teleport.
    	 */
    	public void teleport(TeleportSpell spell) {
    		if(viewingOrb != null || disabled)
    			return;
    		OutputMessages encoder = getMessages();
    		if(teleportStage > 0)
    			return;
    		if(wildernessLevel >= 20) {
    			encoder.sendMessage("You must be below level 20 wilderness to teleport!");
    			return;
    		}
    		if(teleblockTimer.get() > 0) {
    			int time = teleblockTimer.get() * 600;
    			if(time >= 1000 && time <= 60000) {
    				encoder.sendMessage("You must wait approximately " + ((time) / 1000) + " seconds in order to teleport!");
    				return;
    			} else if(time > 60000) {
    				encoder.sendMessage("You must wait approximately " + ((time) / 60000) + " minutes in order to teleport!");
    				return;
    			}
    		}
    		if(!MinigameHandler.execute(this, true, m -> m.canTeleport(this, spell.moveTo())))
    			return;
    		if(!spell.canCast(this))
    			return;
    		FightCavesHandler.remove(this);
    		encoder.sendWalkable(-1);
    		teleportStage = 1;
    		super.getCombatBuilder().reset();
    		faceCharacter(null);
    		setFollowing(false);
    		setFollowCharacter(null);
    		encoder.sendCloseWindows();
    		Skills.experience(this, spell.baseExperience(), Skills.MAGIC);
    		spell.type().execute(this, spell.moveTo());
    	}
    and to teleport to a position;

    Code:
    	/**
    	 * Attempts to teleport this player somewhere based on the type of spellbook
    	 * they have open.
    	 * @param position the position that the player will be moved to.
    	 */
    	public void teleport(Position position) {
    		teleport(new TeleportSpell() {
    			@Override
    			public Position moveTo() {
    				return position;
    			}
    
    			@Override
    			public Spellbook type() {
    				return spellbookManager.getSpellbook();
    			}
    
    			@Override
    			public double baseExperience() {
    				return 0;
    			}
    
    			@Override
    			public Optional<Item[]> itemsRequired(Player player) {
    				return Optional.empty();
    			}
    
    			@Override
    			public int levelRequired() {
    				return 1;
    			}
    		});
    	}
    Most credits go to Lare96.
    public TeleportSpell(Position position, SpellBook book), ur abstract methods are pointless (at most you would make your startCast abstract). I would then have DefaultTeleportSpell, and remove the ridiculousness from teleport(Position) (simply make it call teleport(new DefaultTeleportSpell(position, spellbook) or w.e.
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Banned Market Banned Market Banned


    Join Date
    Jan 2011
    Age
    23
    Posts
    3,115
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    Quote Originally Posted by Intrice Joe View Post
    public TeleportSpell(Position position, SpellBook book), ur abstract methods are pointless (at most you would make your startCast abstract). I would then have DefaultTeleportSpell, and remove the ridiculousness from teleport(Position) (simply make it call teleport(new DefaultTeleportSpell(position, spellbook) or w.e.
    ^ i recommend doing this
    Reply With Quote  
     

  6. #5  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,489
    Thanks given
    179
    Thanks received
    651
    Rep Power
    1311
    Quote Originally Posted by Intrice Joe View Post
    public TeleportSpell(Position position, SpellBook book), ur abstract methods are pointless (at most you would make your startCast abstract). I would then have DefaultTeleportSpell, and remove the ridiculousness from teleport(Position) (simply make it call teleport(new DefaultTeleportSpell(position, spellbook) or w.e.
    Yeah, good thinking. I don't see the point for the Spellbook param though, should perhaps teleport the player depending on his spellbook so its public TeleportSpell(Position position)

    Quote Originally Posted by lare96 View Post
    ^ i recommend doing this
    Should perhaps update your code on the repo as it's the same(?) besides for the spellbook manager class.

    I'm not working for any project atm but not like you guys care lol, haven't touched code for a while now.
    ~No honour among thieves.



    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  7. #6  
    Banned Market Banned Market Banned


    Join Date
    Jan 2011
    Age
    23
    Posts
    3,115
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    Quote Originally Posted by Stanaveli View Post
    Should perhaps update your code on the repo as it's the same(?) besides for the spellbook manager class.
    yeah, just file an issue and ill get to it eventually
    Reply With Quote  
     

  8. #7  
    Registered Member Lil Peep's Avatar
    Join Date
    Oct 2012
    Posts
    882
    Thanks given
    234
    Thanks received
    58
    Rep Power
    0
    Why do you have the 'NONE' enum field entry? Lol (Explain a use for it)
    Reply With Quote  
     

  9. #8  
    Registered Member
    Karma_K's Avatar
    Join Date
    Nov 2012
    Posts
    4,287
    Thanks given
    152
    Thanks received
    610
    Rep Power
    108
    Quote Originally Posted by Bob the Cat View Post
    Why do you have the 'NONE' enum field entry? Lol (Explain a use for it)
    None does the samething as the movePlayer method in pi.
    Reply With Quote  
     

  10. #9  
    Registered Member Lil Peep's Avatar
    Join Date
    Oct 2012
    Posts
    882
    Thanks given
    234
    Thanks received
    58
    Rep Power
    0
    Quote Originally Posted by Karma_K View Post
    None does the samething as the movePlayer method in pi.
    No his is like NONE(?, -1, -1, 0), or something so I don't see the point in having it, just don't send the teleport? I skimmed through code am I missing something? lol
    Reply With Quote  
     

  11. #10  
    Registered Member
    Join Date
    Oct 2013
    Posts
    775
    Thanks given
    48
    Thanks received
    104
    Rep Power
    14
    Quote Originally Posted by Bob the Cat View Post
    No his is like NONE(?, -1, -1, 0), or something so I don't see the point in having it, just don't send the teleport? I skimmed through code am I missing something? lol
    i am Karma_K and i already explained to you what it does. NONE would do the same thing as the movePlayer method in original pi... it would move the player instantly to the location without performing any animations/gfx or delays
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Custom Teleport System
    By Smile Cow in forum Snippets
    Replies: 7
    Last Post: 09-02-2014, 07:51 PM
  2. Redoing Teleport System Again
    By Red Bull in forum Help
    Replies: 10
    Last Post: 12-14-2012, 12:35 PM
  3. [PI] Better teleport system
    By OFF YOUR TITS in forum Snippets
    Replies: 16
    Last Post: 10-26-2012, 11:57 PM
  4. Replies: 5
    Last Post: 08-02-2012, 02:56 AM
  5. pi redoing drops system
    By deans1243 in forum Requests
    Replies: 0
    Last Post: 11-19-2010, 11:15 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •