DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 19, 2013, 11:57:58 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 ... 3 4 [5] 6   Go Down
  Print  
Author Topic: Dwellings: PvP  (Read 14649 times)
0 Members and 1 Guest are viewing this topic.
danbi
Codemeister
****
Offline Offline

Posts: 366


View Profile
« Reply #60 on: November 29, 2007, 10:50:35 PM »

Sichae,

The module still has the trouble with listing that someone is sleeping in the dwelling and then, nobody is in the pvplist.

I have done some investigation on this, and it happens because of the "pvpmodifytargets" hook. That is, some of the targets you select, get rejected by some other module etc.

Perhaps you may make simpler the count selection, by running exactly the same query, then hooking to "pvpmodifytargets" and counting the result, where invalid=0.

More code, but will do the trick.
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #61 on: January 17, 2008, 07:06:45 AM »

does anyone have this working in 1.1.1 without errors?  standard settings on a fresh install and I get this petition:

Quote
[description] = PvPing in houses has stuffed up again. Not to mention gives a ridiculous amount of exp.

You have encountered God Drache which lunges at you with Dark Blade of Serpentis!

God Drache's Hitpoints (Level Cool: 133
YOUR Hitpoints: 393
You stop to scratch an itch
You hit God Drache for 1 points of damage!
You try to hit God Drache but are RIPOSTED for 14 points of damage!
God Drache tries to hit you but MISSES!
God Drache hits you for 9 points of damage!
God Drache hits you for 5 points of damage!
Next round:
You stop to scratch an itch
You try to hit God Drache but are RIPOSTED for 42 points of damage!
You hit God Drache for 6 points of damage!
You try to hit God Drache but are RIPOSTED for 6 points of damage!
You hit God Drache for 48 points of damage!
God Drache tries to hit you but you RIPOSTE for 4 points of damage!
God Drache hits you for 6 points of damage!
Next round:
You stop to scratch an itch
You try to hit God Drache but are RIPOSTED for 39 points of damage!
You hit God Drache for 66 points of damage!
God Drache tries to hit you but you RIPOSTE for 5 points of damage!
God Drache tries to hit you but you RIPOSTE for 11 points of damage!
You receive 20160 experience!
End of Round:
God Drache's Hitpoints (Level Cool: DEAD
YOUR Hitpoints: 272
PHP Warning: "Missing argument 3 for pvpvictory(), called in /var/www/vhosts/legendofsix.com/httpdocs/modules/dwellings_pvp.php on line 6 and defined"
in /var/www/vhosts/legendofsix.com/httpdocs/lib/pvpsupport.php at 59.

Call Stack:
2: pvpvictory(Array(
"creaturename"=>"God `@D`2r`7a`@c`2h`7e`0", "creaturelevel"=>"8", "creatureweapon"=>"`)Dark Blade `7of `$Serpe...", "creaturegold"=>"4472", "creatureexp"=>20160, "creaturehealth"=>-8, "creatureattack"=>"30", "creaturedefense"=>"85", "loggedin"=>"0", "location"=>"Inside dwelling", "laston"=>"2008-01-14 12:27:31", "alive"=>"1", "acctid"=>"30", "pvpflag"=>"0000-00-00 00:00:00", "boughtroomtoday"=>"0", "race"=>"Drow", "playerstarthp"=>"393", "fightstartdate"=>1200548926, "maxhitpoints"=>0, "defense"=>0, "attack"=>0, "dead"=>true, "istarget"=>true, "diddamage"=>1, "expgained"=>true, "type"=>NULL
), "Glorfindal Dwellings") called from /var/www/vhosts/legendofsix.com/httpdocs/modules/dwellings_pvp.php on line 6
3: dwellings_pvp_run() called from /var/www/vhosts/legendofsix.com/httpdocs/runmodule.php on line 33

You have slain God Drache!
You receive 672 gold!
***Because of the difficult nature of this fight, you are awarded an additional 343 experience!
You receive 2057 experience!

/ gives me exp twice >.<

Sichae, are you still coding?
Logged

Nightborn
Guest
« Reply #62 on: January 17, 2008, 07:11:40 AM »

Must be from the last version.
I have not upgraded for some time.

I got this up on 1.1.1+nb and no issues.

The exp stuff was altered after I forked, maybe, I can't tell.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #63 on: January 17, 2008, 09:31:51 AM »

I have it running on 1.1.1 without any errors. I will upload the copy from my game to here, but I don't believe it to be altered much.

Hmm... maybe it was a little bit, or maybe I had a few extra files on my server (archive weight differs by about .9 kb).
« Last Edit: January 17, 2008, 09:34:41 AM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #64 on: January 24, 2008, 11:05:18 AM »

I think that fixed it...
Logged

CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #65 on: March 03, 2008, 08:35:34 AM »

I'm getting the familiar "Click to attack a user -> No Targets Available" bug.  Copied in the new files and reinstalled (clicked the "Reinstall" link - should I have uninstalled then installed again, rather than reinstalling?) from the versions posted in the Downloads area - no luck.  Any ideas?

http://enquirer.improbableisland.com/forum/viewtopic.php?showtopic=38
Logged

CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #66 on: April 09, 2008, 05:43:36 PM »

(update - uninstalled, reinstalled, cleared data cache, the usual suspects - no good.  Using PHP 5, MySQL 4.1.  Can't for the life of me figure out why it's not working.  Any help is much appreciated.)
Logged

seekey
Codemeister
****
Offline Offline

Posts: 475


Demon to some but Angel to others


View Profile WWW
« Reply #67 on: June 07, 2008, 05:51:41 AM »

I think I know what the problem is. The Dwelling PVP Module does not work with the pvp balance module. If you are using the pvp balance, the hook at interact only asks for the level of the sleeper, but not for the dragonkills.

I have made a little fix at the dwellings-list-interact.php

Lines 12-26

Code:
$top = $session['user']['level']+get_module_objpref("dwellingtypes",$typeid,"top-band","dwellings_pvp");
$bottom = $session['user']['level']-get_module_objpref("dwellingtypes",$typeid,"bottom-band","dwellings_pvp");
$sql = "SELECT count(*) AS count FROM ".db_prefix("accounts")."
INNER JOIN ".db_prefix("module_userprefs")."
ON acctid=userid
WHERE (level>=$bottom && level<=$top)
AND (laston < '$last' OR loggedin=0)
AND (pvpflag < '$pvptimeout')
AND (alive=1) AND (locked=0) AND (slaydragon=0)
AND modulename='dwellings'
AND setting='dwelling_saver'
AND value='{$args['dwid']}'";
$res = db_query($sql);
$row = db_fetch_assoc($res);
$dwid = $args['dwid'];

changed to:

Code:
if (!is_module_active('pvpbalance')){
$top = $session['user']['level']+get_module_objpref("dwellingtypes",$typeid,"top-band","dwellings_pvp");
$bottom = $session['user']['level']-get_module_objpref("dwellingtypes",$typeid,"bottom-band","dwellings_pvp");
$sql = "SELECT count(*) AS count FROM ".db_prefix("accounts")."
INNER JOIN ".db_prefix("module_userprefs")."
ON acctid=userid
WHERE (level>=$bottom && level<=$top)
AND (laston < '$last' OR loggedin=0)
AND (pvpflag < '$pvptimeout')
AND (alive=1) AND (locked=0) AND (slaydragon=0)
AND modulename='dwellings'
AND setting='dwelling_saver'
AND value='{$args['dwid']}'";
$res = db_query($sql);
$row = db_fetch_assoc($res);
$dwid = $args['dwid'];
}else{
$dk=$session['user']['dragonkills'];
$adjust=get_module_setting("adjustment","pvpbalance");
$adjusthigher=get_module_setting("adjustmentup","pvpbalance");
$dklow=$dk-$adjust;
$dkhigh=$dk+$adjusthigher;
$top = $session['user']['level']+get_module_objpref("dwellingtypes",$typeid,"top-band","dwellings_pvp");
$bottom = $session['user']['level']-get_module_objpref("dwellingtypes",$typeid,"bottom-band","dwellings_pvp");
$sql = "SELECT count(*) AS count FROM ".db_prefix("accounts")."
INNER JOIN ".db_prefix("module_userprefs")."
ON acctid=userid
WHERE (level>=$bottom && level<=$top)
AND (dragonkills>=$dklow)
AND (dragonkills<=$dkhigh)
AND (laston < '$last' OR loggedin=0)
AND (pvpflag < '$pvptimeout')
AND (alive=1) AND (locked=0) AND (slaydragon=0)
AND modulename='dwellings'
AND setting='dwelling_saver'
AND value='{$args['dwid']}'";
$res = db_query($sql);
$row = db_fetch_assoc($res);
$dwid = $args['dwid'];
}

I don't use the raltive Settings for dragonkills. If you do so, you have to change the $dklow and $dkhigh a little bit.

Similar changes should be made, if you are using an other pvp block or balancing module. On my server it works fine now.
« Last Edit: June 07, 2008, 05:54:06 AM by seekey » Logged
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #68 on: June 07, 2008, 05:57:17 AM »

Aha - the plot thickens.  I already had this working (see this thread) and probably should have posted this link previously, but if there are other problems, it's always good to have them noted/fixed.  Thanks. Smiley
Logged

seekey
Codemeister
****
Offline Offline

Posts: 475


Demon to some but Angel to others


View Profile WWW
« Reply #69 on: June 09, 2008, 04:19:46 PM »

Uhm, I didn't noticed the other Topic. Thanks for the Link CavemanJoe Wink
Logged
Selenity
Guest
« Reply #70 on: August 02, 2008, 12:04:28 PM »

I hate to dredge up this thread...but I have a problem running this module on my 1.1.0 server.

It is all fine and dandy when slaying in the dwellings BUT...when the player goes to the 'Slay other Players' link they get this error:

Code:
SELECT acctid,level FROM accounts

WHERE location='Inside dwelling'
AND (pvpflag < '2008-08-01 14:18:39')
AND (alive=1) AND (locked=0) AND (slaydragon=0)
AND age>2 OR dragonkills>0 OR pk>0 OR experience>1000)
AND (alive=1)
AND (laston<'2008-08-01 14:18:39' OR loggedin=0) AND (acctid<>8)
AND (lastip != '96.24.159.231')
AND (uniqueid != '41d642e94a4a071e01d55b89a1c63cb9')


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (alive=1) AND (laston<'2008-08-01 14:18:39' OR loggedin=0) AND (ac' at line 6
Call Stack:
1: db_query("SELECT acctid,level FROM ...") called from /home/selenity/domains/dragonlunacy.com/public_html/modules/dwellings_pvp/dohook/pvpcount.php on line 26
2: require("/home/selenity/domains/dr...") called from /home/selenity/domains/dragonlunacy.com/public_html/modules/dwellings_pvp.php on line 53
3: dwellings_pvp_dohook("pvpcount", Array(

"count"=>22, "loc"=>"Inside dwelling"

)) called from /home/selenity/domains/dragonlunacy.com/public_html/lib/modules.php on line 512
4: modulehook("pvpcount", Array(

"count"=>22, "loc"=>"Inside dwelling"

)) called from /home/selenity/domains/dragonlunacy.com/public_html/lib/pvplist.php on line 123
5: pvplist() called from /home/selenity/domains/dragonlunacy.com/public_html/pvp.php on line 35


I am not sure how to fix this, and have not found anything with the dwellings PvP that is exactly like this...am I just missing something or is there an error in this freshly downloaded module?
Logged
Lord Zeus
Member
Militia
**
Offline Offline

Posts: 42


God of Lightning


View Profile
« Reply #71 on: August 02, 2008, 02:39:05 PM »

if you look at the code on one of the lines aroun line 61 to 67 one of the codes is missing  ); thats all it needs and it will be fixed
Logged
Selenity
Guest
« Reply #72 on: August 02, 2008, 03:04:18 PM »

if you look at the code on one of the lines aroun line 61 to 67 one of the codes is missing  ); thats all it needs and it will be fixed

Ah, I got it! Thanks for the help, Lord Zeus. Smiley
Logged
Magoo
Militia
**
Offline Offline

Posts: 31

I'm a Noobie till I die!


View Profile
« Reply #73 on: September 08, 2008, 12:52:06 AM »

OK.. Let me try again... Do I need to start a new thread?

The problem... If Dwelling PVP is activated then in the Slay players page it will not show how many people are sleeping or where I.E.  There are X amount of people sleeping in dwellings that you might be interested in.. or Tehre are Xamount of people sleeping in clan barricks that you mgiht be interested in...  Then you can go to the dwellings and find people..

If it is De-Activated then you can see where peopple are sleeping but you cant  of course find them to kill in the dwellings..

I cant find an answer to this and I know it has happend on other sites...
« Last Edit: September 09, 2008, 11:06:47 PM by Magoo » Logged

Founder of the Mighty Blind Fury Clan
CrimsonSoul
Militia
**
Offline Offline

Posts: 18


View Profile
« Reply #74 on: May 20, 2009, 05:57:48 PM »

users get a badnav when trying to attack people in dwellings, you can PvP when trying to plunder the dwelling but when trying to slay the person you get a badnav for any option (fight 5, 10 rounds, run, Abort, etc) link to website is http://www.halflogd.net
Logged
Pages: 1 ... 3 4 [5] 6   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
24 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search