Post: Tablelookup all perks
10-30-2015, 12:40 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I want to lookup all available perks by using the
    statstable.csv
file since all perks are listed there:
You must login or register to view this content. Instead of doing the terrible
    self setPerk("speciality_blablabla");
// ...

for every single perk, I want to look them up from the table using the You must login or register to view this content. function or a similarly elegant way and then give all by iterating the array. Tustin

Any help or existing scripts that are efficient in that regard? Kryptus

EDIT:
Nevermind, it wasn't that hard Smile

    giveAllPerks()
{
tableName = "mp/statsTable.csv";
perksCount = 16;
perksStartingRow = 148;

for(rowIndex = perksStartingRow; rowIndex < perksStartingRow + perksCount; rowIndex++)
{
rowNumberColumn = 0;
perksColumn = 4;

rowNumber = tableLookupRowNum(tableName, rowNumberColumn, rowIndex);

name = tableLookupColumnForRow(tableName, rowNumber, perksColumn);
perks = strTok(name, "|");

foreach(perk in perks)
{
self setPerk(perk);
}
}

self iprintln("^2All perks^7 given");
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked BullyWiiPlaza for this useful post:

EternalHabit
10-30-2015, 01:50 PM #2
-Numb
You talkin to me?
Interesting stuff! Thanks for sharing what you found out Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo