Anonymous | Login | Signup for a new account | 19-04-25 05:55 CEST | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
0002549 | SphereServer | executable - generic | public | 17-08-15 14:59 | 29-12-15 14:21 | ||||||
Reporter | nolok | ||||||||||
Assigned To | |||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||
Status | confirmed | Resolution | open | ||||||||
Platform | OS | OS Version | |||||||||
Product Version | |||||||||||
Target Version | Fixed in Version | ||||||||||
Summary | 0002549: SELL/BUY not working under IF clause in @NpcRestock | ||||||||||
Description | On a vendor: ON=@NpcRestock SELL=i_dagger,2 IF 1 SELL=i_katana,2 ENDIF This results in a purchasable dagger but an Undefined keyword 'SELL' for the katana. I'm using the last nightly. | ||||||||||
Tags | No tags attached. | ||||||||||
Nightly Version | Automated (specify build number) | ||||||||||
Experimental Flags | None | ||||||||||
Option Flags | None | ||||||||||
Internal Build Number | 2419 | ||||||||||
Attached Files | |||||||||||
![]() |
|
(0002948) darksun84 (reporter) 17-08-15 19:02 |
You have to use the BREAK keyword Added: "BREAK" function under @create and @npcrestock to return to normal script interpratation after an ITEM= line since any lines under it was designed to modify the item. (any BUY or SELL line will also break ITEM loop) |
(0002949) nolok (reporter) 17-08-15 19:32 |
24-07-2015, XuN Fixed 0002535: NPCRestock is now accepting code like any other triggers. It should work without BREAK, and even with it: ON=@NpcRestock SELL=i_dagger,2 BREAK IF 1 SELL=i_katana,2 ENDIF it doesn't work. |
(0002991) Ben (manager) 15-11-15 14:41 |
I know where this issue is. @create and @npcrestock were designed differently then the others. BUY and SELL are only present in these triggers, and when normal trigger scripting is added, it no longer recognize these keywords as it thinks it's a normal trigger. I'll see if I can find a way to change that. |
(0002997) Ben (manager) 15-12-15 02:08 |
Been looking at this some more, and it's not an easy fix with the current engine. There is one solution to this... Make @NPCRestock and @Create act like regular triggers and be forced to use NEW.attributehere to affect the previous item. Example how it is now: BUY=I_katana COLOR=color_red With suggested changes this would be required: BUY=I_katana NEW.COLOR=color_red |
(0003004) nolok (reporter) 29-12-15 14:21 |
Would be it possible, in order to achieve both backwards compatibility and a good speed, to enable this suggested behaviour calling FULLINTERP at the beginning of the trigger? |
![]() |
|||
Date Modified | Username | Field | Change |
17-08-15 14:59 | nolok | New Issue | |
17-08-15 19:02 | darksun84 | Note Added: 0002948 | |
17-08-15 19:32 | nolok | Note Added: 0002949 | |
30-10-15 13:11 | XuN | Summary | IF clause not working in @NpcRestock => SELL/BUY not working under IF clause in @NpcRestock |
30-10-15 13:11 | XuN | Status | new => confirmed |
15-11-15 14:41 | Ben | Note Added: 0002991 | |
15-12-15 02:08 | Ben | Note Added: 0002997 | |
29-12-15 14:21 | nolok | Note Added: 0003004 |
Copyright © 2000 - 2010 MantisBT Group |