PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: st0ne-db on 16 June, 2006, 04:45:20

Title: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: st0ne-db on 16 June, 2006, 04:45:20
DopeWarz.v1.4.LUA5.X-PtokaX

DopeWarz 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]

[v1.3 Features/Notes]

[v1.2 Features/Notes]

[v1.1 Features/Notes] - LUA 5.02 and LUA 5.1 Versions

[v1.0 Features/Notes]


Download:

http://the-westside.no-ip.info

or

http://ptxscriptdb.psycho-chihuahua.net
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: st0ne-db on 17 June, 2006, 07:03:42
New version. Edited 1st post.
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: YouAlreadyKnow on 17 June, 2006, 23:19:48
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)
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: TiMeTrAVelleR on 18 June, 2006, 00:00:22
make sure you use right ptokax version whit script

Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: YouAlreadyKnow on 18 June, 2006, 06:01:41
whats the newest vertion of ptokax?
and where can i get it?
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: 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
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: 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 ;)
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: YouAlreadyKnow on 18 June, 2006, 16:34:47
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?
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: 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
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: st0ne-db on 18 June, 2006, 21:51:06
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
Title: Re: DopeWarz.v1.1.LUA5.X-PtokaX
Post by: YouAlreadyKnow on 18 June, 2006, 23:58:47
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
Title: DopeWarz.v1.2.LUA5.X-PtokaX
Post by: st0ne-db on 19 June, 2006, 04:17:09
New version 1.2, edited 1st post.
Title: Re: DopeWarz.v1.2.LUA5.X-PtokaX
Post by: 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
Title: Re: DopeWarz.v1.2.LUA5.X-PtokaX
Post by: st0ne-db on 21 June, 2006, 23:12:08
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 :)
Title: Re: DopeWarz.v1.2.LUA5.X-PtokaX
Post by: Stuffy on 21 June, 2006, 23:25:15
Yeah thx  :D
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: st0ne-db on 22 June, 2006, 10:50:15
new ver 1.3
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: 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.
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: st0ne-db on 23 June, 2006, 04:29:04
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
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: Stuffy on 23 June, 2006, 06:39:24
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 :-)))
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: Stuffy on 26 June, 2006, 11:19:23
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 :-)
Title: Re: DopeWarz.v1.3.LUA5.X-PtokaX
Post by: Stuffy on 26 June, 2006, 12:29:58
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
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: st0ne-db on 12 July, 2006, 23:27:43
new version... edited first post: Changelog (http://forum.ptokax.org/index.php?topic=6078#msg60382)
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: LoOseCannOn913 on 27 July, 2006, 01:22:20
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
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: 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...
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: st0ne-db on 14 January, 2007, 23:28:06
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
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: SirLEO on 15 January, 2007, 11:04:36
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
Title: Re: DopeWarz.v1.4.LUA5.X-PtokaX
Post by: F_O_X on 04 March, 2008, 08:24:41
In new API convert please this script.