Beispiel #1
0
void OpenDOMJoinMenu (edict_t *ent)
{
	if (debuginfo->value)
		gi.dprintf("DEBUG: OpenDOMJoinMenu()\n");

	if (!ShowMenu(ent))
        return;

	// new character
	if (!ent->myskills.class_num)
	{
		OpenClassMenu(ent, 1);
		return;
	}

	clearmenu(ent);

	if (!ent->myskills.administrator && !InJoinedQueue(ent) && (level.time > pregame_time->value))
	{
//							xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
		addlinetomenu(ent, "Vortex Domination:", MENU_GREEN_CENTERED);
		addlinetomenu(ent, " ", 0);
		addlinetomenu(ent, "The match has already", 0);
		addlinetomenu(ent, "begun. You will be joined", 0);
		addlinetomenu(ent, "automatically when the", 0);
		addlinetomenu(ent, "flag is dropped.", 0);
		addlinetomenu(ent, " ", 0);
		addlinetomenu(ent, "Exit", 3);

		setmenuhandler(ent, jointeam_handler);
		ent->client->menustorage.currentline = 8;
		showmenu(ent);

		// indicate that the player wants to join
		ent->client->waiting_to_join = true;
		ent->client->waiting_time = level.time;
		return;
	}

	addlinetomenu(ent, "Vortex Domination:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Your goal is to help your", 0);
	addlinetomenu(ent, "team capture the flag.", 0);
	addlinetomenu(ent, "While your team is in", 0);
	addlinetomenu(ent, "control of the flag, you", 0);
	addlinetomenu(ent, "gain points. Protect your", 0);
	addlinetomenu(ent, "flag carrier! Don't let", 0);
	addlinetomenu(ent, "the flag into enemy hands.", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Join", 1);
	addlinetomenu(ent, "Back", 2);
	addlinetomenu(ent, "Exit", 3);

	setmenuhandler(ent, jointeam_handler);
	ent->client->menustorage.currentline = 11;
	showmenu(ent);
}
Beispiel #2
0
void ShowTradeHelpMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Trading", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " To start a trade, use the", 0);
	addlinetomenu(ent, " command: trade.", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Select up to 3 items", 0);
	addlinetomenu(ent, " for the trade queue,", 0);
	addlinetomenu(ent, " then select 'accept'", 0);
	addlinetomenu(ent, " to complete the trade.", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "cmd: trade [on/off]", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 60);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 13;

	//Display the menu
	showmenu(ent);
}
Beispiel #3
0
void openTalentMenu(edict_t *ent, int talentID)
{
	talent_t *talent	= &ent->myskills.talents.talent[getTalentSlot(ent, talentID)];
	int level			= talent->upgradeLevel;
	int lineCount = 7;//12;

	if (!ShowMenu(ent))
       return;
	clearmenu(ent);

	addlinetomenu(ent, "Talent", MENU_GREEN_CENTERED);
	addlinetomenu(ent, GetTalentString(talentID), MENU_WHITE_CENTERED);
	addlinetomenu(ent, " ", 0);

	lineCount += writeTalentDescription(ent, talentID);

	addlinetomenu(ent, " ", 0);
	//addlinetomenu(ent, "Current", MENU_GREEN_CENTERED);
	//writeTalentUpgrade(ent, talentID, level);
	addlinetomenu(ent, " ", 0);
	
	if(talent->upgradeLevel < talent->maxLevel)
		addlinetomenu(ent, "Upgrade this talent.", -1*(talentID+1));
	else addlinetomenu(ent, " ", 0);

	addlinetomenu(ent, "Previous menu.", talentID+1);

	setmenuhandler(ent, TalentUpgradeMenu_handler);
	ent->client->menustorage.currentline = lineCount;
	showmenu(ent);
}
Beispiel #4
0
void OpenSellMenu (edict_t *ent, int lastline)
{
	//Use the item select menu and change the menu handler
	ShowInventoryMenu(ent, lastline, true);
	setmenuhandler(ent, SellMenu_handler);
	showmenu(ent);
}
Beispiel #5
0
void ShowVoteHelpMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Voting", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " To vote for the next game", 0);
	addlinetomenu(ent, " and map, use the command:", 0);
	addlinetomenu(ent, " vote. You must vote for", 0);
	addlinetomenu(ent, " both a game mode and ", 0);
	addlinetomenu(ent, " a map in order for your", 0);
	addlinetomenu(ent, " vote to be recorded.", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 70);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 10;

	//Display the menu
	showmenu(ent);
}
Beispiel #6
0
void ShowItemMenu(edict_t *ent, int itemindex)
{
	item_t *item = &ent->myskills.items[itemindex];

	//Load the item
	StartShowInventoryMenu(ent, item);

	//Check to see if this item can be equipped or not
	if (!((item->itemtype & ITEM_GRAVBOOTS) || (item->itemtype & ITEM_FIRE_RESIST) || (item->itemtype & ITEM_AUTO_TBALL)))
	{
		if (itemindex < 3)	addlinetomenu(ent, "Stash this item", 4445 + itemindex);
		else				addlinetomenu(ent, "Equip this item", 4445 + itemindex);
		++ent->client->menustorage.currentline;
	}
	
	//Append a footer to the menu
	addlinetomenu(ent, "Previous menu", 7778 + itemindex);
	addlinetomenu(ent, "Exit", 666);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Delete this item", 10000 + itemindex);

	//set currentline
	ent->client->menustorage.currentline += 2;

	//Set handler
	setmenuhandler(ent, ShowItemMenu_handler);

	//Display the menu
	showmenu(ent);
}
Beispiel #7
0
void ShowBasicsMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " To find out more about the", 0);
	addlinetomenu(ent, " basics of Vortex, go", 0);
	addlinetomenu(ent, " visit our website at:", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " www.project-vortex.com", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " There is too much info", 0);
	addlinetomenu(ent, " to show in this menu.", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 10);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 11;

	//Display the menu
	showmenu(ent);
}
Beispiel #8
0
void ShowAllyInviteMenu (edict_t *ent)
{
	edict_t *e = ent->client->allytarget;

	 if (!ShowMenu(ent))
        return;

	clearmenu(ent);
		//				xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, va("%s", e->client->pers.netname), MENU_GREEN_CENTERED);
	addlinetomenu(ent, "would like to ally.", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	//Menu footer
	addlinetomenu(ent, "Accept", 1);
	addlinetomenu(ent, "Decline", 2);

	//Set handler
	setmenuhandler(ent, ShowAllyInviteMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 5;

	//Display the menu
	showmenu(ent);
}
Beispiel #9
0
void ShowRuneTypes(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Rune types:", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Ability runes   (blue)", 0);
	addlinetomenu(ent, " Weapon runes    (red)", 0);
	addlinetomenu(ent, " Combo runes     (purple)", 0);
	addlinetomenu(ent, " Class runes     (cyan)", 0);
	addlinetomenu(ent, " Unique runes    (yellow)", 0);
	addlinetomenu(ent, " Special Uniques (green)", 0);
	
	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Previous", 40);
	addlinetomenu(ent, " Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 10;

	//Display the menu
	showmenu(ent);
}
Beispiel #10
0
void ShowModeHelpMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Game modes:", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "  Player Vs. Player  (PvP)", 0);
	addlinetomenu(ent, "  Player Vs. Monters (PvM)", 0);
	addlinetomenu(ent, "  Domination         (DOM)", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Domination is a variation", 0);
	addlinetomenu(ent, " of capture the flag.", 0);
	addlinetomenu(ent, " Protect your flag runner!", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 80);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 11;

	//Display the menu
	showmenu(ent);
}
Beispiel #11
0
void OpenWeaponUpgradeMenu (edict_t *ent, int lastline)
{
	int i;
	if (!ShowMenu(ent))
		return;
	clearmenu(ent);

	addlinetomenu(ent, "Weapon Upgrades", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Select the weapon you", 0);
	addlinetomenu(ent, "want to upgrade:", 0);
	addlinetomenu(ent, " ", 0);

	for (i = 0; i < MAX_WEAPONS; ++i)
	{
		char weaponString[24];
		strcpy(weaponString, GetWeaponString(i));
		padRight(weaponString, 18);
		addlinetomenu(ent, va("%s%d%c", weaponString, V_WeaponUpgradeVal(ent, i),'%'), (i+10)*100);
	}

	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Exit", 6666);
	setmenuhandler(ent, weaponmenu_handler);
	if (lastline)
		ent->client->menustorage.currentline = lastline + 5;
	else
		ent->client->menustorage.currentline = MAX_WEAPONS + 7;
	showmenu(ent);

	// try to shortcut to chat-protect mode
	if (ent->client->idle_frames < CHAT_PROTECT_FRAMES-51)
		ent->client->idle_frames = CHAT_PROTECT_FRAMES-51;
}
Beispiel #12
0
void OpenArmoryMenu (edict_t *ent)
{
	if (!ShowMenu(ent))
        return;

	clearmenu(ent);

	addlinetomenu(ent, "The Armory", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Welcome to the Armory!", 0);
	addlinetomenu(ent, "Select the item you want", 0);
	addlinetomenu(ent, "to purchase from the", 0);
	addlinetomenu(ent, va("Armory. You have %d", ent->myskills.credits), 0);
	addlinetomenu(ent, "credits.", 0);
	addlinetomenu(ent, " ", 0);
	if (level.time < pregame_time->value)
		addlinetomenu(ent, "Buy", 1);
	addlinetomenu(ent, "Buy Runes", 2);
	addlinetomenu(ent, "Sell", 3);
	addlinetomenu(ent, "Exit", 4);

	setmenuhandler(ent, armorymenu_handler);
	ent->client->menustorage.currentline = 9;
	showmenu(ent);
}
Beispiel #13
0
void ShowInventoryMenu(edict_t *ent, int lastline, qboolean selling)
{
	int i;

	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	addlinetomenu(ent, va("%s's items", ent->client->pers.netname), MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	//Print each item
	for (i = 0; i < MAX_VRXITEMS; ++i)
	{
		item_t *item;
		item = &ent->myskills.items[i];

		//Print equip slot (if required)
		switch(i)
		{
		case 0:	addlinetomenu(ent, " Hand", MENU_GREEN_LEFT); break;
		case 1:	addlinetomenu(ent, " Neck", MENU_GREEN_LEFT); break;
		case 2:	addlinetomenu(ent, " Belt", MENU_GREEN_LEFT); break;
		case 3:	addlinetomenu(ent, " Stash", MENU_GREEN_LEFT);break;
		}
		addlinetomenu(ent, va("%s", V_MenuItemString(item, ' ')), i+1);
	}

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowInventoryMenu_handler);

	//Where are we in the menu?
	if (lastline)
	{
		switch(lastline)
		{
		case 1:		ent->client->menustorage.currentline = 4; break;
		case 2:		ent->client->menustorage.currentline = 6; break;
		case 3:		ent->client->menustorage.currentline = 8; break;
		default:	ent->client->menustorage.currentline = 6 + lastline; break;	//start at line 10
		}
	}
	else ent->client->menustorage.currentline = 18;

	//Display the menu (don't show it if this menu was loaded from the armory!)
	if (!selling) showmenu(ent);
}
Beispiel #14
0
void ShowAllyMenu (edict_t *ent)
{
	int i;
	int j = 0;
	edict_t *temp;

	//Don't bother displaying the menu if alliances are disabled
	if (!allies->value)
	{
		safe_cprintf(ent, PRINT_HIGH, "Alliances are disabled.\n");
		return;
	}

	// alliance only work in pvp mode
	if (!ValidAllyMode())
	{
		safe_cprintf(ent, PRINT_HIGH, "Alliances are disabled.\n");
		return;
	}

	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	addlinetomenu(ent, "Currently allied with:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	for_each_player(temp, i)
	{
		if (IsAlly(ent, temp))
		{
			//Add player to the list
			addlinetomenu(ent, va(" %s", temp->myskills.player_name), 0);
			++j;
		}
	}

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Add Ally", 1);
	addlinetomenu(ent, "Remove Ally", 2);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowAllyMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 6 + j;

	//Display the menu
	showmenu(ent);
}
Beispiel #15
0
void OpenGeneralWeaponMenu (edict_t *ent, int lastline)
{
	int WeaponIndex = (lastline / 100) - 10;
	int modIndex = (lastline % 100);
	int i;

	if (!ShowMenu(ent))
		return;
	clearmenu(ent);

	addlinetomenu(ent, va("%s\n(%d%c)", GetWeaponString(WeaponIndex), V_WeaponUpgradeVal(ent, WeaponIndex), '%'), MENU_GREEN_CENTERED);
	addlinetomenu(ent, va("Weapon points left: %d", ent->myskills.weapon_points), MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Select the weapon", 0);
	addlinetomenu(ent, " attribute you want to", 0);
	addlinetomenu(ent, " improve upon.", 0);
	addlinetomenu(ent, " ", 0);

	for (i = 0; i < MAX_WEAPONMODS; ++i)
	{
		char sMod[30];
		int level, cur;
		level = ent->myskills.weapons[WeaponIndex].mods[i].level;
		cur = ent->myskills.weapons[WeaponIndex].mods[i].current_level;
		strcpy(sMod, GetModString(WeaponIndex, i));
		padRight(sMod, 15);
		strcat(sMod, va("%d", level));
		padRight(sMod, 18);
		addlinetomenu(ent, va("%s[%d]", sMod, cur), ((WeaponIndex+10)*100) + i + 1);
	}
		
	setmenuhandler(ent, generalWeaponMenu_handler);

	if (modIndex)
		ent->client->menustorage.currentline = modIndex + 7;
	else
		ent->client->menustorage.currentline = 14;

	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous Menu", 7777 + WeaponIndex);
	addlinetomenu(ent, "Exit", 6666);

	showmenu(ent);
}
Beispiel #16
0
void ShowAddAllyMenu (edict_t *ent)
{
	int i;
	int j = 0;
	edict_t *temp;

	 if (!ShowMenu(ent))
		return;
	clearmenu(ent);

	addlinetomenu(ent, "Select a player:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	for_each_player(temp, i)
	{
		if (CanAlly(ent, temp, ALLY_RANGE))
		{
			//Add player to the list
			addlinetomenu(ent, va(" %s (%s)", temp->myskills.player_name, 
				GetClassString(temp->myskills.class_num)), GetClientNumber(temp));
			++j;

			// 3.65 can only display up to 10 possible allies
			// any more than this will cause the game to crash
			// FIXME: split this up into multiple menus?
			if (j >= 10)
				break;
		}
		
	}

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowAddAllyMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 4 + j;

	//Display the menu
	showmenu(ent);
}
Beispiel #17
0
void OpenPurchaseMenu (edict_t *ent, int page_num, int lastline)
{
	int i;

	//Usual menu stuff
	if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Header
	addlinetomenu(ent, va("You have %d credits", ent->myskills.credits), MENU_GREEN_CENTERED);
	addlinetomenu(ent, "Please make a selection:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	//Print this page's items
    for (i = (page_num-1)*10; i < page_num*10; ++i)
	{
		if (i < ARMORY_ITEMS)
			addlinetomenu(ent, va("%s", GetArmoryItemString(i+1)), i+1);
		else addlinetomenu(ent, " ", 0);
	}

	//Footer
	addlinetomenu(ent, " ", 0);
	if (i < ARMORY_ITEMS) addlinetomenu(ent, "Next", (page_num*1000)+2);
	addlinetomenu(ent, "Back", (page_num*1000)+1);
	addlinetomenu(ent, "Exit", 99);

	//Menu handler
	setmenuhandler(ent, PurchaseMenu_handler);

	//Set the menu cursor
	if (lastline % 10)	//selected 0-9 in this page
		ent->client->menustorage.currentline = (lastline % 10) + 3;
	else if (lastline)	//selected #10 in this page
		ent->client->menustorage.currentline = 13;
	else if (ARMORY_ITEMS > 10)	//menu is under 10 items
		ent->client->menustorage.currentline = 15;
	else ent->client->menustorage.currentline = 5 + i;

	//Show the menu
	showmenu(ent);
}
Beispiel #18
0
void OpenTalentUpgradeMenu (edict_t *ent, int lastline)
{
	talent_t	*talent;
	char		buffer[30];
	int			i;
    
	if (!ShowMenu(ent))
       return;
	clearmenu(ent);

	// menu header
	addlinetomenu(ent, "Talents", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	for (i = 0; i < ent->myskills.talents.count; i++)
	{
		talent = &ent->myskills.talents.talent[i];

		//create menu string
		strcpy(buffer, GetTalentString(talent->id));
		strcat(buffer, ":");
		padRight(buffer, 15);

		addlinetomenu(ent, va("%d. %s %d/%d", i+1, buffer, talent->upgradeLevel, talent->maxLevel), talent->id);
	}

	// menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, va("You have %d talent points.", ent->myskills.talents.talentPoints), 0);
	addlinetomenu(ent, " ", 0);

	addlinetomenu(ent, "Exit", 9999);
	setmenuhandler(ent, openTalentMenu_handler);

	if (!lastline)	ent->client->menustorage.currentline = ent->myskills.talents.count + 6;
	else			ent->client->menustorage.currentline = lastline + 2;

	showmenu(ent);

	// try to shortcut to chat-protect mode
	if (ent->client->idle_frames < CHAT_PROTECT_FRAMES-51)
		ent->client->idle_frames = CHAT_PROTECT_FRAMES-51;
}
Beispiel #19
0
void OpenBuyRuneConfirmMenu(edict_t *ent, int option)
{
	int page_num = option / 1000;
	int selection = (option % 1000)-1;

	armoryRune_t *firstItem;
	item_t *rune;

	switch(page_num)
	{
	case 1: firstItem = WeaponRunes;	break;
	case 2: firstItem = AbilityRunes;	break;
	case 3: firstItem = ComboRunes;		break;
	default: 
		gi.dprintf("Error in OpenBuyRuneConfirmMenu(). Invalid page number: %d\n", page_num);
		return;
	}

	rune = &((firstItem + selection)->rune);	

	//Process the header
	StartShowInventoryMenu(ent, rune);

	//Menu footer
	addlinetomenu(ent, va("  Price: %d", getBuyValue(rune)), 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "  Buy this item?", 0);
	addlinetomenu(ent, "No, I changed my mind!", (page_num * 10) + selection);
	addlinetomenu(ent, "Yes, GIMME GIMME!!.", option);

	//Set handler
	setmenuhandler(ent, BuyRuneConfirmMenu_handler);

	ent->client->menustorage.currentline += 7;

	//Display the menu
	showmenu(ent);
	
}
Beispiel #20
0
void ItemDeleteMenu(edict_t *ent, int itemindex)
{
	item_t *item = &ent->myskills.items[itemindex];

	//Process the header
	StartShowInventoryMenu(ent, item);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "  Delete this item?", 0);
	addlinetomenu(ent, "No, I changed my mind!", 667 + itemindex);
	addlinetomenu(ent, "Yes, delete this item.", 778 + itemindex);

	//Set handler
	setmenuhandler(ent, DeleteMenu_handler);

	ent->client->menustorage.currentline += 4;

	//Display the menu
	showmenu(ent);
}
Beispiel #21
0
void ShowItemsHelpMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Item types:", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " Health potions", MENU_GREEN_LEFT);
	addlinetomenu(ent, "  Heals 50% max health.", 0);
	addlinetomenu(ent, " Holy water", MENU_GREEN_LEFT);
	addlinetomenu(ent, "  Removes all curses.", 0);
	addlinetomenu(ent, " Tballs", MENU_GREEN_LEFT);
	addlinetomenu(ent, "  Teleport self/others.", 0);
	addlinetomenu(ent, " Gravity Boots", MENU_GREEN_LEFT);
	addlinetomenu(ent, "  Jump great distances.", 0);
	addlinetomenu(ent, " Fire Resistant Clothing", MENU_GREEN_LEFT);
	addlinetomenu(ent, "  Resists burns.", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " To use: cmd use <item>", 0);
	addlinetomenu(ent, " Some items are automatic.", 0);
	addlinetomenu(ent, " Tballs can not be dropped.", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 50);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 18;

	//Display the menu
	showmenu(ent);
}
Beispiel #22
0
void ShowCommandsMenu(edict_t *ent)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Standard Vortex Commands:", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " set vrx_password <pass> u", 0);
	addlinetomenu(ent, " email <address>", 0);
	addlinetomenu(ent, " upgrade_weapon", 0);
	addlinetomenu(ent, " upgrade_ability", 0);
	addlinetomenu(ent, " vrxarmory", 0);
	addlinetomenu(ent, " vrxrespawn", 0);
	addlinetomenu(ent, " vrxinfo", 0);
	addlinetomenu(ent, " rune", 0);
	addlinetomenu(ent, " vote", 0);
	addlinetomenu(ent, " vrxid", 0);
	addlinetomenu(ent, " use tball [self]", 0);
	addlinetomenu(ent, " togglesecondary", 0);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Previous", 20);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowSecondaryMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 16;

	//Display the menu
	showmenu(ent);
}
Beispiel #23
0
void ShowAllyWaitMenu (edict_t *ent)
{
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);
		//				xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, "Please wait for player to ", MENU_GREEN_CENTERED);
	addlinetomenu(ent, "accept your invitation. ", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	//Menu footer
	addlinetomenu(ent, "Close Window", 666);
	addlinetomenu(ent, "Cancel Invitation", 1);

	//Set handler
	setmenuhandler(ent, ShowAllyWaitMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 4;

	//Display the menu
	showmenu(ent);
}
Beispiel #24
0
void ShowRemoveAllyMenu (edict_t *ent)
{
	int i;
	int j = 0;
	edict_t *temp;

	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	addlinetomenu(ent, "Select a player:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	for_each_player(temp, i)
	{
		if (IsAlly(ent, temp))
		{
			//Add player to the list
			addlinetomenu(ent, va(" %s", temp->myskills.player_name), GetClientNumber(temp));
			++j;
		}
		
	}

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowRemoveAllyMenu_handler);

	//Set current line
	ent->client->menustorage.currentline = 4 + j;

	//Display the menu
	showmenu(ent);
}
Beispiel #25
0
void OpenSellConfirmMenu(edict_t *ent, int itemindex)
{
	item_t *item = &ent->myskills.items[itemindex];

	//Process the header
	StartShowInventoryMenu(ent, item);

	//Menu footer
	addlinetomenu(ent, va("  Sell value: %d", GetSellValue(item)), 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "  Sell this item?", 0);
	addlinetomenu(ent, "No, I changed my mind!", 667 + itemindex);
	addlinetomenu(ent, "Yes, sell this item.", 778 + itemindex);

	//Set handler
	setmenuhandler(ent, SellConfirmMenu_handler);

	ent->client->menustorage.currentline += 7;

	//Display the menu
	showmenu(ent);
}
Beispiel #26
0
void ShowHelpMenu(edict_t *ent, int lastpick)
{
	//Usual menu stuff
	 if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Print header
	addlinetomenu(ent, "Choose a help topic:", MENU_GREEN_LEFT);
	addlinetomenu(ent, " ", 0);

	//					xxxxxxxxxxxxxxxxxxxxxxxxxxx (max length 27 chars)
	addlinetomenu(ent, " Basics", 10);
	addlinetomenu(ent, " Standard commands", 20);
	addlinetomenu(ent, " Print full command list", 30);
	addlinetomenu(ent, " Rune Types", 40);
	addlinetomenu(ent, " Consumable items", 50);
	addlinetomenu(ent, " Trading", 60);
	addlinetomenu(ent, " Voting", 70);
	addlinetomenu(ent, " Game modes", 80);

	//Menu footer
	addlinetomenu(ent, " ", 0);
	addlinetomenu(ent, "Exit", 666);

	//Set handler
	setmenuhandler(ent, ShowHelpMenu_handler);

	//Set current line
	if (lastpick)
		ent->client->menustorage.currentline = (lastpick / 10) + 2;
	else ent->client->menustorage.currentline = 12;

	//Display the menu
	showmenu(ent);
}
Beispiel #27
0
void OpenBuyRuneMenu(edict_t *ent, int page_num, int lastline)
{
	int i;
	armoryRune_t *firstItem;

	//Usual menu stuff
	if (!ShowMenu(ent))
        return;
	clearmenu(ent);

	//Header
	addlinetomenu(ent, va("You have %d credits", ent->myskills.credits), MENU_GREEN_CENTERED);
	addlinetomenu(ent, "Please make a selection:", MENU_GREEN_CENTERED);
	addlinetomenu(ent, " ", 0);

	switch(page_num)
	{
	case 1: firstItem = WeaponRunes;	break;
	case 2: firstItem = AbilityRunes;	break;
	case 3: firstItem = ComboRunes;		break;
	default: 
		gi.dprintf("Error in OpenBuyRuneMenu(). Invalid page number: %d\n", page_num);
		return;
	}

	//Print this page's items
    for (i = 0; i < ARMORY_MAX_RUNES; ++i)
	{
		item_t *rune = &((firstItem + i)->rune);
		if (rune->itemtype != ITEM_NONE)
		{
			char buf[32];
			strcpy(buf, V_MenuItemString(rune, ' '));
			padRight(buf, 18);
			addlinetomenu(ent, va("%s%d", buf, getBuyValue(rune)), (page_num * 1000) + i + 1);
		}
		else 
		{
			switch(page_num)
			{
			case 1: addlinetomenu(ent, "    <Empty Weapon Slot>", 0); break;
			case 2: addlinetomenu(ent, "    <Empty Ability Slot>", 0); break;
			case 3: addlinetomenu(ent, "    <Empty Combo Slot>", 0); break;
			}
		}
	}

	//Footer
	addlinetomenu(ent, " ", 0);
	if (page_num < 3) addlinetomenu(ent, "Next", (page_num*10)+2);
	addlinetomenu(ent, "Back", (page_num*10)+1);
	addlinetomenu(ent, "Exit", 99);

	//Menu handler
	setmenuhandler(ent, BuyRuneMenu_handler);

	//Set the menu cursor
	if (lastline)	ent->client->menustorage.currentline = 4 + lastline;
	else			ent->client->menustorage.currentline = 15;
	
	//Show the menu
	showmenu(ent);
}