DopeWarz.v1.4.LUA5.X-PtokaXDopeWarz is a LUA adaptation of the classic game.
http://en.wikipedia.org/wiki/Dope_Wars
DopeWarz is a game in which the player simulates the role of a drug dealer.
The game's objective is to become the most powerfull dealer on the hub.
DopeWarz is based on the computer game, Drug Wars. The newest adaptation
Dope Wars inspired this script. http://www.treadon.us
[v1.4 Features/Notes]
- Crash, Error: [1388: attempt to compare number with nil] (Thx. Toobster?)
- Crash, Error: [2305: attempt to index field `?' a nil value] (Thx. Stormbringer)
- Crash, Error: [2642: attempt to index local `user' a string value] (Thx. Shamu)
- Crash, Error: [1783: attempt to compare string with number] (Thx. Toobster? & Stormbringer)
- Crash, Error: [1811: attempt to compare string with number] -1 in weapon max buy column (Thx. Stormbringer)
- Crash, Error: [1765: attempt to index local `user' a string value] (Thx. Stormbringer)
- Crash, Error: [1062: attempt to perform arithmetic on field 'ThugJack' a nil value] (Thx. Toobster?)
- Crash, Error: [1026: attempt to perform arithmetic on field 'ThugRaid' a nil value] (Thx. Toobster?)
- Fixed, Problem creating main data file (Thx. Toobster?)
- Fixed, Game day acceleration error (Thx. Toobster?)
- Fixed, Script now auto corrects empty pocket mismatch errors
- Fixed, Stopped Random Events For 'Home', 'Coat' and 'Help' Screens
- Fixed, Small Code Optimizations
- Fixed, Rackets no longer produce fully trained junkies
- Added, MyDW-ini Game Initaliazation File. To allow for easier upgrades and changes.
- Added. The Grand Bank of DopeWarz
- Added, New Stats: Most money in the bank, Most times arrested
- Added, Help for new features
- Removed, Coat Cheat (was causing some problems, use the money cheat to buy a bigger coat!)
[v1.3 Features/Notes]
- Crash, Error: [2173: attempt to perform arithmetic on field 'iRandDruglab'] random occuring event (Thx. Toobster?)
- Crash, Error: [2327: attempt to compare nil with number] while building user records (Thx. Toobster?)
- Crash, Error: [2754: bad argument #1 to `TableMaxSize'] while using market status (Thx. Stuffy)
- Added, Support for PtokaX 0.3.5.0 w/ LUA 5.1.1
- Added, New Jobs: Rackets (Suggested By. Toobster?)
- Added, New custom drugs, areas and rackets can be added/removed without needing to recreate the main data file. (script updates automaticly)
- Added, Game Messages to all players on Thug Task, Jump or random event success (Req. Toobster?)
- Added, You can be arrested if you have to run from the cops with 0% stamina.
- Added, Help sections added for new features
[v1.2 Features/Notes]
- Fixed, Bug, Showing same player twice on the score board (Thx. Toobster?)
- Added, Single Script now supports both LUA 5.02 and LUA 5.1 Versions (Thx. Madman)
- Added, Ability to create unlimited additional custom drugs (Requested By. Toobster?)
- Added, Additional Thug Tasks: Jack Player, Raid Druglab
- Added, Random events that occur:
- Druglab can be raided
- Junkies can O.D.
- Factory machines can break
- Find Tokens
- Run from cops (lower stamina)
[v1.1 Features/Notes] - LUA 5.02 and LUA 5.1 Versions
- Fixed, Various Crashes
- Fixed, Bug, Junkie production payment
- Fixed, Bug, Stamina decrease after jump
- Fixed, Cost Tokens even if a jump fails
- Fixed, Thug tasks and jumps would allow you to go into negative tokens
- Added, Disable jump warning option
- Added, Thug sabatoge now affects druglab, junkies and factory
- Added, Global modifier for game difficulity
[v1.0 Features/Notes]
- Multi-Player
- Full Right-Click Menus
- Admin Commands
- Fully Customizable
- Game Records / Stats
- ASCII Graphics / Menus
Download:
http://the-westside.no-ip.info
or
http://ptxscriptdb.psycho-chihuahua.net
New version. Edited 1st post.
thanks for the script
but i got this
[18:15] Syntax ....no-ip.info)\scripts\DopeWarz.v1.1.LUA5.1-PtokaX.lua:2103: attempt to call field `maxn' (a nil value)
make sure you use right ptokax version whit script
whats the newest vertion of ptokax?
and where can i get it?
Quote from: YouAlreadyKnow on 18 June, 2006, 06:01:41
whats the newest vertion of ptokax?
and where can i get it?
Try this: http://www.PtokaX.org/files/0.3.4.0l0.dbg.7z
Quote from: YouAlreadyKnow on 17 June, 2006, 23:19:48
[18:15] Syntax ....no-ip.info)\scripts\DopeWarz.v1.1.LUA5.1-PtokaX.lua:2103: attempt to call field `maxn' (a nil value)
Just make sure you get the right verion of the script...
Ptokax 0.3.4.0l0 is 5.0.2 lua... there for the 5.0.2 version is required...
You are useing 5.1 version on a 5.0.2 Ptokax....
Ptokax 0.3.4.0.dbg is 5.0.2 aswell...
@ st0ne-db
Nice script...
To avoid ppl takeing the wrong lua script version, you can rewrite it, and make so only one dl is needed...
I have so on latest FunScript...
only 2 things are needed _VERSION and a var for table.getn/maxn
The rest I let you figure out ;)
Quote from: 6Marilyn6Manson6 on 18 June, 2006, 07:47:24
Quote from: YouAlreadyKnow on 18 June, 2006, 06:01:41
whats the newest vertion of ptokax?
and where can i get it?
Try this: http://www.PtokaX.org/files/0.3.4.0l0.dbg.7z
nah says 404 file not found
and if i got 5.0.2 Ptokax where do i get the right script?
Quote from: YouAlreadyKnow on 18 June, 2006, 16:34:47
and if i got 5.0.2 Ptokax where do i get the right script?
Version: DopeWarz.v1.1.LUA5-PtokaX can be found here:
http://the-westside.no-ip.info/download.php?view.15
Quote from: Madman on 18 June, 2006, 11:10:28
Quote from: YouAlreadyKnow on 17 June, 2006, 23:19:48
[18:15] Syntax ....no-ip.info)\scripts\DopeWarz.v1.1.LUA5.1-PtokaX.lua:2103: attempt to call field `maxn' (a nil value)
Just make sure you get the right verion of the script...
Ptokax 0.3.4.0l0 is 5.0.2 lua... there for the 5.0.2 version is required...
You are useing 5.1 version on a 5.0.2 Ptokax....
Ptokax 0.3.4.0.dbg is 5.0.2 aswell...
@ st0ne-db
Nice script...
To avoid ppl takeing the wrong lua script version, you can rewrite it, and make so only one dl is needed...
I have so on latest FunScript...
only 2 things are needed _VERSION and a var for table.getn/maxn
The rest I let you figure out ;)
Great idea!! Thanks for the info Madman ;D
Quote from: st0ne-db on 18 June, 2006, 21:50:17
Quote from: YouAlreadyKnow on 18 June, 2006, 16:34:47
and if i got 5.0.2 Ptokax where do i get the right script?
Version: DopeWarz.v1.1.LUA5-PtokaX can be found here:
http://the-westside.no-ip.info/download.php?view.15
thanks alot works great now
but if some one could id like a link to the LUA 5.1 PtokaX cuase i cant find a working one any where
thanks for any help ...YAK
New version 1.2, edited 1st post.
Hi, sorry for my bad english.
I have a Prob with this script.
When I use the command "market status" in version 1,2 i got this error: [23:41] Syntax F:\grauzone\scripts\DopeWarz.v1.2.LUA5.X-PtokaX.lua:2754: bad argument #1 to `TableMaxSize' (table expected, got nil)
in Version 1,1 is this Errormessage: [23:49] Syntax F:\grauzone\scripts\DopeWarz.v1.1.LUA5-PtokaX.lua:2567: bad argument #1 to `getn' (table expected, got nil)
can anyone help me, with this script ?
thx to all
Quote from: Stuffy on 21 June, 2006, 22:52:55
Hi, sorry for my bad english.
I have a Prob with this script.
When I use the command "market status" in version 1,2 i got this error: [23:41] Syntax F:\grauzone\scripts\DopeWarz.v1.2.LUA5.X-PtokaX.lua:2754: bad argument #1 to `TableMaxSize' (table expected, got nil)
in Version 1,1 is this Errormessage: [23:49] Syntax F:\grauzone\scripts\DopeWarz.v1.1.LUA5-PtokaX.lua:2567: bad argument #1 to `getn' (table expected, got nil)
can anyone help me, with this script ?
thx to all
Thank you, this will be fixed in the new version :)
Yeah thx :D
new ver 1.3
Hi Stone-DB
this bug is greatly fixed, but i have found another strange think. When you go to McRonalds and let it work, you can only say "mcronalds work 6" and upstairs, but when you type 6 hours, the script said you work for 1 hour. By 10 hours you work 5 hours. the work begins by -5 hours.
I hope you know what i mean *gg
Thank you for the speedy fix and your hard work on this script. It is very nice. I'm translate it in German for me.
Quote from: Stuffy on 23 June, 2006, 04:19:46
Hi Stone-DB
this bug is greatly fixed, but i have found another strange think. When you go to McRonalds and let it work, you can only say "mcronalds work 6" and upstairs, but when you type 6 hours, the script said you work for 1 hour. By 10 hours you work 5 hours. the work begins by -5 hours.
I hope you know what i mean *gg
Thank you for the speedy fix and your hard work on this script. It is very nice. I'm translate it in German for me.
i think this is working correctly... like it says on the game.
Your Salary is:
(Tokens Spent - 5 ) * $2000
6 tokens - 5 = 1 hour * $2000
10 tokens - 5 = 5 hours * $2000
hope that this helps
Ah ok, i haven't checked with the computation in this script.
It's a little bit confusingly a 6 to write, when a 1 comes.
thx for the answer.
I hope i go with my german translated version today evening online in my hub. Up to now, the script runs perfect :-)))
Hi, I have found another Bug. in this part:
function doBlackMarketPending()
for user in pairs(DopeWars.DWData.MARKET.PENDING) do
for i = 1, 5 do
local iNum = TableMaxSize(DopeWars.DWData.MARKET.PENDING[user][i]);
if iNum > 0 then
for z = iNum, 1, -1 do
local iCurRound = DopeWars.DWData.MARKET.PENDING[user][i][z]["time"];
DopeWars.DWData.MARKET.PENDING[user][i][z]["time"] = iCurRound - 1;
if DopeWars.DWData.MARKET.PENDING[user][i][z]["time"] <= 0 then
local iCurSale = DopeWars.DWData.MARKET.SELLING[i];
local iCurSelling = DopeWars.DWData.MARKET.PENDING[user][i][z]["amount"];
local iCurMoney = DopeWars.DWPlayers[user]["money"];
DopeWars.DWPlayers[user]["money"] = iCurMoney + DopeWars.DWData.MARKET.PENDING[user][i][z]["profit"];
DopeWars.DWData.MARKET.SELLING[i] = iCurSale + iCurSelling;
doGameMessageByUser(user.sName, "*** You have sold "..tostring(iCurSelling).." "..tVar.tClasses[i]["name"].." credits for "..tVar.sMoney..DopeWars.DWData.MARKET.PENDING[user][i][z]["profit"]..".");
table.remove(DopeWars.DWData.MARKET.PENDING[user][i], z);
in this line:
doGameMessageByUser(user.sName, "*** You have sold "..tostring(iCurSelling).." "..tVar.tClasses[i]["name"].." credits for "..tVar.sMoney..DopeWars.DWData.MARKET.PENDING[user][i][z]["profit"]..".");
i have this errormessage:
DopeWarz.v1.3.LUA5.X-PtokaX.lua:2633: attempt to index local `user' (a string value)
I hope you can help me with this bug.
thank you very very much :-)
hmm i have this errormessage in the moment with only dope warz script.
DopeWarz.v1.3.LUA5.X-PtokaX.lua:3340: attempt to perform arithmetic on global `iTime' (a nil value)
but only, when i have my played files in the dopewarz directory. empty data it works
new version... edited first post: Changelog (http://forum.ptokax.org/index.php?topic=6078#msg60382)
i downloaded the script, now what do i have to do exactly to install and run it?
I havent messed around with scripts for awhile, so I really dont have an idea of what to do anymore...
I would appreciate the help...
thanx
Hi, I have Ptokax 0.3.5.2 and DopeWarz.v1.4.LUA5.X and some errors:
After starting:
[13:05] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:2538: bad argument #1 to 'TableMaxSize' (table expected, got nil)
[13:05] Script started.
[13:06] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:1511: attempt to index field 'MESSAGES' (a nil value)
[13:09] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:1523: bad argument #1 to 'pairs' (table expected, got nil)
What to do?
[newbie]How to play?[/newbie] :>
Other LUA5.1 scripts works fine. Eg. latest Robocop, RSSBot, Poll.Bot, freshstuff, chatstats, RR3a...
Quote from: SirLEO on 13 January, 2007, 13:24:25
Hi, I have Ptokax 0.3.5.2 and DopeWarz.v1.4.LUA5.X and some errors:
After starting:
[13:05] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:2538: bad argument #1 to 'TableMaxSize' (table expected, got nil)
[13:05] Script started.
[13:06] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:1511: attempt to index field 'MESSAGES' (a nil value)
[13:09] Syntax ..\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:1523: bad argument #1 to 'pairs' (table expected, got nil)
What to do?
[newbie]How to play?[/newbie] :>
Other LUA5.1 scripts works fine. Eg. latest Robocop, RSSBot, Poll.Bot, freshstuff, chatstats, RR3a...
just edit the script.. goto around line 197
replace
require(INI_PATH.."MyDW-ini.lua");
with
package.path = "./"..INI_PATH.."/?.lua;"..package.path
require "MyDW-ini"
-St0ne db
Some better, but;
After starting:
[10:40] Syntax ...\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:2540: bad argument #1 to 'TableMaxSize' (table expected, got nil)
If I click in r-m menu:
[10:42] Syntax ...\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:3344: bad argument #1 to 'TableMaxSize' (table expected, got nil)
Game notify that I'm already in game, ok, delete game, and start it again:
[10:46] Syntax ...\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:2471: attempt to index field 'MESSAGES' (a nil value)
By clicking second time Start Game, I've got "title screen", and error, but nothing else.
[10:55] Syntax ...\0.3.5.2\scripts\DopeWarz.v1.4.LUA5.X-PtokaX.lua:1513: attempt to index field 'MESSAGES' (a nil value)
No help about commands or how to play, no additional menu (only Start Game, Delete and View Game Winners).
Maybe I have wrong/broken version this game?
My client: DC++ 0.698
In new API convert please this script.