Author Topic: Warp  (Read 2271 times)

0 Members and 1 Guest are viewing this topic.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Warp
« on: July 25, 2009, 04:48:55 pm »
Script name: Warp (and WarpCreator)
Short description: Add teleporters to any map. Rounded, rectangle-shaped, big, small, for everyone, for one team only, marked with flame or invisible. You choose.
Original author: fri
Core version: 2.6.5

Description
This script allows you to have teleporters on any Soldat map. If you made some futuristic map and you want it to have portals / want to add warps to default maps / just want to have fun - this script is for you.
Warp is divided into two parts: Engine (small; it reads INI files and converts settings stored in there to warp points) and Creator (bigger one; it allows you to make map-configs, add new warps or modify existing ones). The Warp Creator is disabled by default, so it doesn't eat your server's memory.

By default, warps are marked with flames, so you can spot them easily. You can limit the number of times a player can warp (see Configuration).

When Warp Creator is active you can't change the map or use /recompile and /reload commands.

Warp uses:
- modified WriteINI procedure made by rhide and NTxC
- SetScriptState procedure by rainrider
- modified DoesFileExist function by CurryWurst
Thank you all!

Configuration
Code: [Select]
  maxnum      = 16;   // highest possible playerID on server   |   recommended: (slots+2) or even higher
  maxwarp     = 20;   // maximum number of warp points on map   |   used only in arrays to reduce server load
  spawnflames = true; // spawn flames to show warps' placement?   |   true/false
  warplimit   = 0;    // maximum possible number of teleportations per player   |   0 to disable limiter
Note: These settings can not be changed in-game, you have to edit them manually (warp.pas).

Commands (Warp Engine)
/pos- Shows your coordinates.
/reload- Reloads INI file containing warps' settings.
/creator <0/1>- Disables / activates Warp Creator.

Commands (Warp Creator)
/start- The first command you should use after activating Creator Mode. It makes you the only one who can control the INI file.
/warp- Places a new warp at your position or changes coordinates of edited warp to yours.
/back- Goes back one step (useful if you mistyped any value). Works only in init setup and when adding a new warp.
/inf- Displays info about current step.
/inf <warp#>- Displays info about specified warp.
/edit cool <num>- Sets cooldown value (seconds).
/edit still <0/1>- Sets stand-still to false or true.
/edit <warp#>- Enters Edit Mode for specified warp.
Edit Mode:
  /edit shape <c/r>- Sets warp's shape to circle or rectangle.
  /edit x <num>- Sets warp's X position.
  /edit y <num>- Sets warp's Y position.
  /edit width <num>- Sets warp's width [rectangle] or radius (NOT diameter!) [circle] (pixels).
  /edit height <num>- Sets warp's height (pixels).
  /edit target <warp>- Sets warp's target (destination) to specified warp.
  /edit team <0..4>- Sets team which can use this warp (1..4 - teams; 0 - everyone).
  /edit save- Saves all changes and exits Edit Mode. You need to do this, otherwise no changes will apply.
  /edit reset- Resets warp's settings to default values. May be useful, but I don't know what for.
  /edit delete- Deletes currently edited warp. This can't be undone, so use with care.

Notes
If a big text says you have to enter some values, use normal text (chat); don't use commands to enter those values.
You don't have to know all these commands, because once you set everything up, everything will work automatically without anyone's input.
The commands are accessible in-game (use /help or /inf).
I didn't use /info command because I didn't want to disable embedded commands through result:=true.
Only in-game admins can use these commands.

Images
[ screen 1 ]
[ screen 2 ]
[ screen 3 ]




« Last Edit: May 10, 2014, 12:36:38 pm by freestyler »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Warp (0.9 RC)
« Reply #1 on: July 25, 2009, 06:05:57 pm »
Very good :) Suggestion: Draw a circle/rectange with flames so player will see clearly how big is a warp he's editing.

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Warp (0.9 RC)
« Reply #2 on: July 26, 2009, 01:54:44 am »
It's already there. While you're editing any warp there are flames spawned on its corners (rectangle) or on the edge (circle).

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Warp (0.9 RC)
« Reply #3 on: July 26, 2009, 08:21:07 am »
Ummm... no?
My warps were in tight spots and I didn't see those flames.
« Last Edit: July 26, 2009, 08:24:30 am by Gizd »

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: Warp
« Reply #4 on: July 27, 2009, 11:21:29 am »
Version 1.0 released, first post updated.